|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
edu.stanford.nlp.util.ArraySet<E>
public class ArraySet<E>
An array-backed set.
Constructor Summary | |
---|---|
ArraySet()
Constructs an ArraySet. |
|
ArraySet(E... elements)
Constructs an ArraySet with the specified elements. |
|
ArraySet(int initialSize)
Constructs an ArraySet with specified initial size of backing array. |
Method Summary | |
---|---|
boolean |
add(E e)
Adds element to set. |
java.util.Iterator<E> |
iterator()
Returns iterator over elements of the set. |
int |
size()
Returns size of set. |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray |
Constructor Detail |
---|
public ArraySet()
public ArraySet(int initialSize)
initialSize
- initial size of the backing array.public ArraySet(E... elements)
elements
- the elements to be put in the set.Method Detail |
---|
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.Set<E>
iterator
in class java.util.AbstractCollection<E>
public boolean add(E e)
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class java.util.AbstractCollection<E>
e
- the element to be added.
false
if the set already contained (vis. .equals()
) the specified element; true
otherwise.public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.Set<E>
size
in class java.util.AbstractCollection<E>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |