JKBean.java 673 字节
package com.skua.modules.quartz.util;

import java.util.HashMap;

public class JKBean extends HashMap<Object, Object> {

	public JKBean() {

	}

	public JKBean(HashMap<Object, Object> map) {
		super(map);
	}

	public Object get(Object key, Object value) {
		if (containsKey(key)) {
			return get(key);
		}
		return value;
	}

	public String getStr(Object key) {
		return get(key, "").toString();
	}

	public Integer getInteger(Object key) {
		return Integer.parseInt(String.valueOf(get(key, 0)));
	}

	public double getDouble(Object key) {
		return Double.parseDouble(String.valueOf(get(key, 0.0)));
	}

	public void set(Object key, Object value) {
		put(key, value);
	}
}