From 1618adf71b6510dd35c1aef3b1b280831d4b4c97 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 26 Oct 2010 02:45:10 +0200 Subject: ArrayHashSet: List toList() -> ArrayList toArrayList() --- src/java/com/jogamp/common/util/ArrayHashSet.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/java/com/jogamp/common/util/ArrayHashSet.java') 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. *
@@ -357,6 +354,13 @@ public class ArrayHashSet // 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. *
-- cgit v1.2.3