|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.jgrapht.util.ArrayUnenforcedSet<E>
public class ArrayUnenforcedSet<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.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
ArrayUnenforcedSet()
|
|
ArrayUnenforcedSet(java.util.Collection<? extends E> c)
|
|
ArrayUnenforcedSet(int n)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, 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.Set |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from interface java.util.List |
---|
containsAll |
Constructor Detail |
---|
public ArrayUnenforcedSet()
public ArrayUnenforcedSet(java.util.Collection<? extends E> c)
public ArrayUnenforcedSet(int n)
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<E>
equals
in interface java.util.List<E>
equals
in interface java.util.Set<E>
equals
in class java.util.AbstractList<E>
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in interface java.util.List<E>
hashCode
in interface java.util.Set<E>
hashCode
in class java.util.AbstractList<E>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |