net.sf.molae.pipe.sorted
Class SortedMapProxy<B extends SortedMap<K,V>,K,V>

java.lang.Object
  extended by net.sf.molae.pipe.basic.ObjectProxy<B>
      extended by net.sf.molae.pipe.basic.MapProxy<B,K,V>
          extended by net.sf.molae.pipe.sorted.SortedMapProxy<B,K,V>
All Implemented Interfaces:
Map<K,V>, SortedMap<K,V>

public class SortedMapProxy<B extends SortedMap<K,V>,K,V>
extends MapProxy<B,K,V>
implements SortedMap<K,V>

Delegates all method calls to another sorted map. Base class for wrapper implementations.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SortedMapProxy(B base)
          Constructs a new proxy of the specified object.
 
Method Summary
 Comparator<? super K> comparator()
           
 K firstKey()
           
 SortedMap<K,V> headMap(K toKey)
           
 K lastKey()
           
 SortedMap<K,V> subMap(K fromKey, K toKey)
           
 SortedMap<K,V> tailMap(K fromKey)
           
 
Methods inherited from class net.sf.molae.pipe.basic.MapProxy
clear, containsKey, containsValue, entrySet, equals, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class net.sf.molae.pipe.basic.ObjectProxy
assertNotNull, getBase, hashCode, toString, toVerboseString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.SortedMap
entrySet, keySet, values
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
 

Constructor Detail

SortedMapProxy

public SortedMapProxy(B base)
Constructs a new proxy of the specified object.

Parameters:
base - the underlying object.
Throws:
NullPointerException - if the specified object is null.
Method Detail

comparator

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

subMap

public SortedMap<K,V> subMap(K fromKey,
                             K toKey)
Specified by:
subMap in interface SortedMap<K,V>

headMap

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

tailMap

public SortedMap<K,V> tailMap(K fromKey)
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>