net.sf.jbaobab.expirable
Class ExpirableSortedMap<K,V>

java.lang.Object
  extended by net.sf.jbaobab.expirable.AbstractExpirableCollection<Map.Entry<K,V>>
      extended by net.sf.jbaobab.expirable.ExpirableMap<K,V>
          extended by net.sf.jbaobab.expirable.ExpirableSortedMap<K,V>
All Implemented Interfaces:
Map<K,V>, SortedMap<K,V>

public class ExpirableSortedMap<K,V>
extends ExpirableMap<K,V>
implements SortedMap<K,V>

An expirable decorator for a SortedMap.

Author:
Oakyoon Cha

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jbaobab.expirable.ExpirableMap
ExpirableMap.InternalRemoverImpl<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
expirer, remover, timeout
 
Constructor Summary
ExpirableSortedMap(SortedMap<K,V> map)
           
ExpirableSortedMap(SortedMap<K,V> map, long timeout)
           
 
Method Summary
 Comparator<? super K> comparator()
           
 K firstKey()
           
 SortedMap<K,V> headMap(K to)
           
 K lastKey()
           
 SortedMap<K,V> subMap(K from, K to)
           
 SortedMap<K,V> tailMap(K from)
           
 
Methods inherited from class net.sf.jbaobab.expirable.ExpirableMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, put, putAll, remove, size, values
 
Methods inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
finalize, getHandler, setHandler, timeout, timeout
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ExpirableSortedMap

public ExpirableSortedMap(SortedMap<K,V> map,
                          long timeout)

ExpirableSortedMap

public ExpirableSortedMap(SortedMap<K,V> map)
Method Detail

comparator

public Comparator<? super K> comparator()
Specified by:
comparator in interface SortedMap<K,V>

subMap

public SortedMap<K,V> subMap(K from,
                             K to)
Specified by:
subMap in interface SortedMap<K,V>

headMap

public SortedMap<K,V> headMap(K to)
Specified by:
headMap in interface SortedMap<K,V>

tailMap

public SortedMap<K,V> tailMap(K from)
Specified by:
tailMap in interface SortedMap<K,V>

firstKey

public K firstKey()
Specified by:
firstKey in interface SortedMap<K,V>

lastKey

public K lastKey()
Specified by:
lastKey in interface SortedMap<K,V>