diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-02-27 13:42:15 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-02-27 13:42:15 +0200 |
commit | a9541c3abdb4805ee905864d8942a62fc7bbcae2 (patch) | |
tree | ef5581c541650b3c641e898d11d6f98432cafdad /src/com/vaadin/terminal/gwt/client/FastStringSet.java | |
parent | 43bff90363a786ff7087719736c49daa4ee21d50 (diff) | |
download | vaadin-framework-a9541c3abdb4805ee905864d8942a62fc7bbcae2.tar.gz vaadin-framework-a9541c3abdb4805ee905864d8942a62fc7bbcae2.zip |
Refactor #8313 based on API review
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/FastStringSet.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/FastStringSet.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/FastStringSet.java b/src/com/vaadin/terminal/gwt/client/FastStringSet.java index b5b4b8dc1d..05ed8addc8 100644 --- a/src/com/vaadin/terminal/gwt/client/FastStringSet.java +++ b/src/com/vaadin/terminal/gwt/client/FastStringSet.java @@ -32,7 +32,9 @@ public final class FastStringSet extends JavaScriptObject { /*-{ var array = []; for(var string in this) { - array.push(string); + if (this.hasOwnProperty(string)) { + array.push(string); + } } return array; }-*/; @@ -42,6 +44,16 @@ public final class FastStringSet extends JavaScriptObject { delete this[string]; }-*/; + public native boolean isEmpty() + /*-{ + for(var string in this) { + if (this.hasOwnProperty(string)) { + return false; + } + } + return true; + }-*/; + public static FastStringSet create() { return JavaScriptObject.createObject().cast(); } |