diff options
author | Sven Gothel <sgothel@jausoft.com> | 2010-10-26 02:45:10 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2010-10-26 02:45:10 +0200 |
commit | 1618adf71b6510dd35c1aef3b1b280831d4b4c97 (patch) | |
tree | b9fa29f69ee53807623753c6aab256f9664360d9 /src/java/com/jogamp | |
parent | 03b9741af9d3088afe6833553be54b14469922fc (diff) |
ArrayHashSet: List toList() -> ArrayList toArrayList()
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r-- | src/java/com/jogamp/common/util/ArrayHashSet.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/java/com/jogamp/common/util/ArrayHashSet.java b/src/java/com/jogamp/common/util/ArrayHashSet.java index d1e555f..1d938f2 100644 --- a/src/java/com/jogamp/common/util/ArrayHashSet.java +++ b/src/java/com/jogamp/common/util/ArrayHashSet.java @@ -80,9 +80,10 @@ public class ArrayHashSet // Cloneable // - public final Object clone() - throws CloneNotSupportedException - { + /** + * @return a shallow copy of this ArrayHashSet, elements are not copied. + */ + public final Object clone() { ArrayList clonedList = (ArrayList)data.clone(); ArrayHashSet newObj = new ArrayHashSet(); @@ -276,10 +277,6 @@ public class ArrayHashSet return data.indexOf(element); } - public final List toList() { - return data; - } - /** * Add element at the given index in this list, if it is not contained yet. * <br> @@ -358,6 +355,13 @@ public class ArrayHashSet // /** + * @return a shallow copy of this ArrayHashSet's ArrayList, elements are not copied. + */ + public final ArrayList toArrayList() { + return (ArrayList) data.clone(); + } + + /** * Identity method allowing to get the identical object, using the internal hash map. * <br> * This is an O(1) operation. |