net.sf.molae.pipe.sorted
Class SortedSetProxy<B extends SortedSet<E>,E>

java.lang.Object
  extended by net.sf.molae.pipe.basic.ObjectProxy<B>
      extended by net.sf.molae.pipe.basic.CollectionProxy<B,E>
          extended by net.sf.molae.pipe.basic.SetProxy<B,E>
              extended by net.sf.molae.pipe.sorted.SortedSetProxy<B,E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>, SortedSet<E>

public class SortedSetProxy<B extends SortedSet<E>,E>
extends SetProxy<B,E>
implements SortedSet<E>

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


Constructor Summary
SortedSetProxy(B base)
          Constructs a new proxy of the specified object.
 
Method Summary
 Comparator<? super E> comparator()
           
 E first()
           
 SortedSet<E> headSet(E toElement)
           
 E last()
           
 SortedSet<E> subSet(E fromElement, E toElement)
           
 SortedSet<E> tailSet(E fromElement)
           
 
Methods inherited from class net.sf.molae.pipe.basic.SetProxy
equals
 
Methods inherited from class net.sf.molae.pipe.basic.CollectionProxy
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
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.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

SortedSetProxy

public SortedSetProxy(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 E> comparator()
Specified by:
comparator in interface SortedSet<E>

subSet

public SortedSet<E> subSet(E fromElement,
                           E toElement)
Specified by:
subSet in interface SortedSet<E>

headSet

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

tailSet

public SortedSet<E> tailSet(E fromElement)
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>