org.granite.client.persistence.collection
Class PersistentSortedMap<K,V>

java.lang.Object
  extended by org.granite.client.persistence.collection.AbstractPersistentCollection<C>
      extended by org.granite.client.persistence.collection.AbstractPersistentMapCollection<K,V,SortedMap<K,V>>
          extended by org.granite.client.persistence.collection.PersistentSortedMap<K,V>
All Implemented Interfaces:
Externalizable, Serializable, Map<K,V>, SortedMap<K,V>, PersistentCollection, PersistentSortedCollection<K>

public class PersistentSortedMap<K,V>
extends AbstractPersistentMapCollection<K,V,SortedMap<K,V>>
implements SortedMap<K,V>, PersistentSortedCollection<K>

Author:
Franck WOLFF
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
PersistentSortedMap()
           
PersistentSortedMap(SortedMap<K,V> collection)
           
PersistentSortedMap(SortedMap<K,V> collection, boolean clone)
           
 
Method Summary
 Comparator<? super K> comparator()
           
protected  org.granite.messaging.persistence.PersistentCollectionSnapshot createSnapshot(boolean forReading)
           
 K firstKey()
           
 SortedMap<K,V> headMap(K toKey)
           
 K lastKey()
           
 SortedMap<K,V> subMap(K fromKey, K toKey)
           
 SortedMap<K,V> tailMap(K fromKey)
           
protected  void updateFromSnapshot(ObjectInput in, org.granite.messaging.persistence.PersistentCollectionSnapshot snapshot)
           
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentMapCollection
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, put, putAll, remove, size, values
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentCollection
checkInitialized, clearDirty, dirty, getClassLoader, getCollection, init, isDirty, readExternal, wasInitialized, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
 
Methods inherited from interface org.granite.client.persistence.collection.PersistentCollection
clearDirty, dirty, isDirty, wasInitialized
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

PersistentSortedMap

public PersistentSortedMap()

PersistentSortedMap

public PersistentSortedMap(SortedMap<K,V> collection)

PersistentSortedMap

public PersistentSortedMap(SortedMap<K,V> collection,
                           boolean clone)
Method Detail

comparator

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

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>

createSnapshot

protected org.granite.messaging.persistence.PersistentCollectionSnapshot createSnapshot(boolean forReading)
Specified by:
createSnapshot in class AbstractPersistentCollection<SortedMap<K,V>>

updateFromSnapshot

protected void updateFromSnapshot(ObjectInput in,
                                  org.granite.messaging.persistence.PersistentCollectionSnapshot snapshot)
Specified by:
updateFromSnapshot in class AbstractPersistentCollection<SortedMap<K,V>>