net.sf.molae.pipe.genimpl
Class SortedListAsSortedMap.SortedListAsMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by net.sf.molae.pipe.genimpl.SortedListAsSortedMap.SortedListAsMap<K,V>
All Implemented Interfaces:
Map<K,V>
Enclosing class:
SortedListAsSortedMap<K,V>

protected static class SortedListAsSortedMap.SortedListAsMap<K,V>
extends AbstractMap<K,V>

Sorted list backed implementation of the Map interface.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 void clear()
          Removes all mappings from the base list.
 boolean containsKey(Object key)
           
 Set<Map.Entry<K,V>> entrySet()
           
 V get(Object key)
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 V remove(Object key)
           
 int size()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

size

public int size()
Specified by:
size in interface Map<K,V>
Overrides:
size in class AbstractMap<K,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>
Overrides:
containsKey in class AbstractMap<K,V>
Throws:
ClassCastException - if the search key in not mutually comparable with the elements of the list.

get

public V get(Object key)
Specified by:
get in interface Map<K,V>
Overrides:
get in class AbstractMap<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V>
Overrides:
put in class AbstractMap<K,V>
Throws:
ClassCastException - if the specified key in not mutually comparable with the elements of the base list.

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>
Overrides:
remove in class AbstractMap<K,V>

clear

public void clear()
Removes all mappings from the base list.

Specified by:
clear in interface Map<K,V>
Overrides:
clear in class AbstractMap<K,V>
Throws:
UnsupportedOperationException - depending on the base list

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>
Specified by:
entrySet in class AbstractMap<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V>
Overrides:
keySet in class AbstractMap<K,V>