summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/common/util')
-rw-r--r--src/java/com/jogamp/common/util/ArrayHashSet.java18
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.