net.sf.jbaobab.expirable
Class ExpirableSortedSet<E>

java.lang.Object
  extended by net.sf.jbaobab.expirable.AbstractExpirableCollection<E>
      extended by net.sf.jbaobab.expirable.ExpirableCollection<E>
          extended by net.sf.jbaobab.expirable.ExpirableSet<E>
              extended by net.sf.jbaobab.expirable.ExpirableSortedSet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>, SortedSet<E>

public class ExpirableSortedSet<E>
extends ExpirableSet<E>
implements SortedSet<E>

An expirable decorator for a SortedSet.

Author:
Oakyoon Cha

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jbaobab.expirable.ExpirableCollection
ExpirableCollection.InternalRemoverImpl<E>
 
Field Summary
 
Fields inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
expirer, remover, timeout
 
Constructor Summary
ExpirableSortedSet(SortedSet<E> set)
           
ExpirableSortedSet(SortedSet<E> set, long timeout)
           
 
Method Summary
 Comparator<? super E> comparator()
           
 E first()
           
 SortedSet<E> headSet(E to)
           
 E last()
           
 SortedSet<E> subSet(E from, E to)
           
 SortedSet<E> tailSet(E from)
           
 
Methods inherited from class net.sf.jbaobab.expirable.ExpirableCollection
add, add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
finalize, getHandler, setHandler, timeout, timeout
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

ExpirableSortedSet

public ExpirableSortedSet(SortedSet<E> set,
                          long timeout)

ExpirableSortedSet

public ExpirableSortedSet(SortedSet<E> set)
Method Detail

comparator

public Comparator<? super E> comparator()
Specified by:
comparator in interface SortedSet<E>

subSet

public SortedSet<E> subSet(E from,
                           E to)
Specified by:
subSet in interface SortedSet<E>

headSet

public SortedSet<E> headSet(E to)
Specified by:
headSet in interface SortedSet<E>

tailSet

public SortedSet<E> tailSet(E from)
Specified by:
tailSet in interface SortedSet<E>

first

public E first()
Specified by:
first in interface SortedSet<E>

last

public E last()
Specified by:
last in interface SortedSet<E>