public class BoundedTreeSet<E> extends TreeSet<E>
last()
is removed if the size()
get's bigger then getMaxSize()
Constructor and Description |
---|
BoundedTreeSet(int maxSize) |
BoundedTreeSet(int maxSize,
Collection<? extends E> c) |
BoundedTreeSet(int maxSize,
Comparator<? super E> c) |
BoundedTreeSet(int maxSize,
SortedSet<E> s) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E item) |
boolean |
addAll(Collection<? extends E> c) |
int |
getMaxSize() |
void |
setMaxSize(int max) |
clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet
equals, hashCode, removeAll
containsAll, retainAll, toArray, toArray, toString
public BoundedTreeSet(int maxSize)
public BoundedTreeSet(int maxSize, Collection<? extends E> c)
public BoundedTreeSet(int maxSize, Comparator<? super E> c)
public int getMaxSize()
public void setMaxSize(int max)
public boolean add(E item)