JKBean.java
673 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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);
}
}