From: Manuel Carrasco MoƱino Date: Sun, 19 Jan 2014 17:51:49 +0000 (+0000) Subject: adjust generics X-Git-Tag: gwtquery-project-1.4.3~44^2~13^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=66b15fa9b6e16a5e5fd17b43e28e81eaa2afaf34;p=gwtquery.git adjust generics --- 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 load(Object prp); + T load(Object prp); /** * parses a json string and loads the resulting properties object. */ - J parse(String json); + T parse(String json); /** * Returns the underlying object, normally a Properties jso in client * and a Json implementation in JVM. */ - J getBound(); + T getBound(); /** * Return the Object with the given key. @@ -46,7 +46,7 @@ public interface Binder { /** * Set an Object with the given key. */ - T set(Object key, Object val); + 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 load(Object prp) { + public final 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 parse(String json) { + public final 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> implements J } @SuppressWarnings("unchecked") - public T set(Object key, Object val) { + public T set(Object key, Object val) { if (val instanceof Binder) { p.set(key, ((Binder)val).getBound()); } else {