public class SmallSet
extends java.util.AbstractSet
This implementation has the useful property that the iteration order is the same as the order in which the items are added.
Constructor and Description |
---|
SmallSet() |
SmallSet(java.util.Collection col) |
SmallSet(int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object o) |
boolean |
contains(java.lang.Object o) |
java.util.Iterator |
iterator() |
int |
size() |
addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public SmallSet()
public SmallSet(int size)
public SmallSet(java.util.Collection col)
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in class java.util.AbstractCollection
public int size()
size
in interface java.util.Collection
size
in interface java.util.Set
size
in class java.util.AbstractCollection
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.Set
add
in class java.util.AbstractCollection
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in class java.util.AbstractCollection