/**
* load a properties object.
*/
- <J> J load(Object prp);
+ <T extends Binder> T load(Object prp);
/**
* parses a json string and loads the resulting properties object.
*/
- <J> J parse(String json);
+ <T extends Binder> T parse(String json);
/**
* Returns the underlying object, normally a Properties jso in client
* and a Json implementation in JVM.
*/
- <J> J getBound();
+ <T> T getBound();
/**
* Return the Object with the given key.
/**
* Set an Object with the given key.
*/
- <T> T set(Object key, Object val);
+ <T extends Binder> T set(Object key, Object val);
/**
* return a list of field names.
return c().length() == 0;
}
- public final <J> J load(Object prp) {
+ public final <J extends Binder> J load(Object prp) {
c().clear();
if (prp instanceof JsCache) {
c().copy((JsCache)prp);
return getBound();
}
- public final <J> J parse(String json) {
+ public final <J extends Binder> J parse(String json) {
return load(JsUtils.parseJSON(json));
}
}
@SuppressWarnings("unchecked")
- public <T> T set(Object key, Object val) {
+ public <T extends Binder> T set(Object key, Object val) {
if (val instanceof Binder) {
p.set(key, ((Binder)val).getBound());
} else {