|
||||||||||
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>
java.util.TreeSet<E>
org.apache.solr.util.BoundedTreeSet<E>
public class BoundedTreeSet<E>
A TreeSet that ensures it never grows beyond a max size.
last()
is removed if the size()
get's bigger then getMaxSize()
Constructor Summary | |
---|---|
BoundedTreeSet(int maxSize)
|
|
BoundedTreeSet(int maxSize,
java.util.Collection<? extends E> c)
|
|
BoundedTreeSet(int maxSize,
java.util.Comparator<? super E> c)
|
|
BoundedTreeSet(int maxSize,
java.util.SortedSet<E> s)
|
Method Summary | |
---|---|
boolean |
add(E item)
|
boolean |
addAll(java.util.Collection<? extends E> c)
|
int |
getMaxSize()
|
void |
setMaxSize(int max)
|
Methods inherited from class java.util.TreeSet |
---|
ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public BoundedTreeSet(int maxSize)
public BoundedTreeSet(int maxSize, java.util.Collection<? extends E> c)
public BoundedTreeSet(int maxSize, java.util.Comparator<? super E> c)
public BoundedTreeSet(int maxSize, java.util.SortedSet<E> s)
Method Detail |
---|
public int getMaxSize()
public void setMaxSize(int max)
public boolean add(E item)
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class java.util.TreeSet<E>
public boolean addAll(java.util.Collection<? extends E> c)
addAll
in interface java.util.Collection<E>
addAll
in interface java.util.Set<E>
addAll
in class java.util.TreeSet<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |