tyrex.util
public class ArraySet extends AbstractSet
Nested Class Summary | |
---|---|
protected class | ArraySet.ArraySetIterator
AbstractSet requires an implementation for the iterator. |
Field Summary | |
---|---|
protected Object[] | _table
The table of all objects in this set. |
Constructor Summary | |
---|---|
ArraySet()
Construct a new empty set. | |
ArraySet(Collection collection)
Construct a new set from the specified set and linked to a subject.
|
Method Summary | |
---|---|
boolean | add(Object obj) |
boolean | addAll(Collection collection)
Add the items from the specified collection
to the set.
|
protected boolean | canAdd(Object object)
Return true if the specified argument can be added
to the set.
|
protected Object | get(int index)
Returns the element at the specified index, or null if the
index is out of bounds. |
Iterator | iterator() |
boolean | remove(Object obj) |
int | size() |
Parameters: subject the subject type the type set the set used to populate the created set
Parameters: collection the collection
Returns: True if items from the specified collection were added to the set.
The default implementation returns true.
Parameters: object the object
Returns: true if the specified argument can be added to the set.