org.elasticsearch.common.collect
Class BoundedTreeSet<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<E>
              extended by org.elasticsearch.common.collect.BoundedTreeSet<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, NavigableSet<E>, Set<E>, SortedSet<E>

public class BoundedTreeSet<E>
extends TreeSet<E>

A TreeSet that is bounded by size.

See Also:
Serialized Form

Constructor Summary
BoundedTreeSet(Comparator<? super E> comparator, int size)
           
BoundedTreeSet(int size)
           
 
Method Summary
 boolean add(E e)
           
 boolean addAll(Collection<? extends E> c)
           
 
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

BoundedTreeSet

public BoundedTreeSet(int size)

BoundedTreeSet

public BoundedTreeSet(Comparator<? super E> comparator,
                      int size)
Method Detail

add

public boolean add(E e)
Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>
Overrides:
add in class TreeSet<E>

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface Set<E>
Overrides:
addAll in class TreeSet<E>


Copyright © 2009-2012. All Rights Reserved.