aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-01-19 17:51:49 +0000
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-01-19 17:51:49 +0000
commit66b15fa9b6e16a5e5fd17b43e28e81eaa2afaf34 (patch)
treefcfe0aede2918648b37bef96a0d0ddc718cfeb7b
parentf0949bb68e5a753ecf6527af8b5d1c9bc84a9f7c (diff)
downloadgwtquery-66b15fa9b6e16a5e5fd17b43e28e81eaa2afaf34.tar.gz
gwtquery-66b15fa9b6e16a5e5fd17b43e28e81eaa2afaf34.zip
adjust generics
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Binder.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Binder.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Binder.java
index 2f0e47e5..852a3c41 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Binder.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Binder.java
@@ -25,18 +25,18 @@ public interface Binder {
/**
* 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.
@@ -46,7 +46,7 @@ public interface Binder {
/**
* 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.
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
index 60ac6a6b..d24a7f98 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Properties.java
@@ -202,7 +202,7 @@ public class Properties extends JavaScriptObject implements Binder {
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);
@@ -210,7 +210,7 @@ public class Properties extends JavaScriptObject implements Binder {
return getBound();
}
- public final <J> J parse(String json) {
+ public final <J extends Binder> J parse(String json) {
return load(JsUtils.parseJSON(json));
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
index 40dbdae7..cfa77296 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilderBase.java
@@ -123,7 +123,7 @@ public abstract class JsonBuilderBase<J extends JsonBuilderBase<?>> implements J
}
@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 {