Package org.jgrapht.util
Class ArrayUnenforcedSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.jgrapht.util.ArrayUnenforcedSet<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,SequencedCollection<E>
,Set<E>
Helper for efficiently representing small sets whose elements are known to be
unique by construction, implying we don't need to enforce the uniqueness
property in the data structure itself. Use with caution.
Note that for equals/hashCode, the class implements the Set behavior (unordered), not the list behavior (ordered); the fact that it subclasses ArrayList should be considered an implementation detail.
- Author:
- John V. Sichi
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
ArrayUnenforcedSet
public ArrayUnenforcedSet() -
ArrayUnenforcedSet
-
ArrayUnenforcedSet
public ArrayUnenforcedSet(int n)
-
-
Method Details
-
equals
-
hashCode
public int hashCode()
-