org.granite.client.persistence.collection
Class PersistentSortedSet<E>

java.lang.Object
  extended by org.granite.client.persistence.collection.AbstractPersistentCollection<C>
      extended by org.granite.client.persistence.collection.AbstractPersistentSimpleCollection<E,SortedSet<E>>
          extended by org.granite.client.persistence.collection.PersistentSortedSet<E>
All Implemented Interfaces:
Externalizable, Serializable, Iterable<E>, Collection<E>, Set<E>, SortedSet<E>, PersistentCollection, PersistentSortedCollection<E>

public class PersistentSortedSet<E>
extends AbstractPersistentSimpleCollection<E,SortedSet<E>>
implements SortedSet<E>, PersistentSortedCollection<E>

Author:
Franck WOLFF
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.granite.client.persistence.collection.PersistentCollection
PersistentCollection.ChangeListener, PersistentCollection.InitializationCallback, PersistentCollection.InitializationListener
 
Constructor Summary
PersistentSortedSet()
           
PersistentSortedSet(boolean initialized)
           
PersistentSortedSet(SortedSet<E> collection)
           
PersistentSortedSet(SortedSet<E> collection, boolean clone)
           
 
Method Summary
 PersistentSortedSet<E> clone(boolean uninitialize)
           
 Comparator<? super E> comparator()
           
protected  PersistentCollectionSnapshot createSnapshot(Object io, boolean forReading)
           
protected  void doInitialize()
           
 E first()
           
 SortedSet<E> headSet(E toElement)
           
 E last()
           
 SortedSet<E> subSet(E fromElement, E toElement)
           
 SortedSet<E> tailSet(E fromElement)
           
protected  void updateFromSnapshot(ObjectInput in, PersistentCollectionSnapshot snapshot)
           
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentSimpleCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class org.granite.client.persistence.collection.AbstractPersistentCollection
addListener, addListener, checkInitializedRead, checkInitializedWrite, clearDirty, dirty, getClassLoader, getCollection, getDetachedState, getLoader, init, initialize, initializing, isDirty, readExternal, removeListener, removeListener, setLoader, toString, uninitialize, wasInitialized, withInitialized, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, 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
 
Methods inherited from interface org.granite.client.persistence.collection.PersistentCollection
addListener, addListener, clearDirty, dirty, getLoader, initialize, initializing, isDirty, removeListener, removeListener, setLoader, uninitialize, wasInitialized, withInitialized
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

PersistentSortedSet

public PersistentSortedSet()

PersistentSortedSet

public PersistentSortedSet(boolean initialized)

PersistentSortedSet

public PersistentSortedSet(SortedSet<E> collection)

PersistentSortedSet

public PersistentSortedSet(SortedSet<E> collection,
                           boolean clone)
Method Detail

doInitialize

protected void doInitialize()
Specified by:
doInitialize in class AbstractPersistentCollection<SortedSet<E>>

comparator

public Comparator<? super E> comparator()
Specified by:
comparator in interface SortedSet<E>
Specified by:
comparator in interface PersistentSortedCollection<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>

createSnapshot

protected PersistentCollectionSnapshot createSnapshot(Object io,
                                                      boolean forReading)
Overrides:
createSnapshot in class AbstractPersistentSimpleCollection<E,SortedSet<E>>

updateFromSnapshot

protected void updateFromSnapshot(ObjectInput in,
                                  PersistentCollectionSnapshot snapshot)
Specified by:
updateFromSnapshot in class AbstractPersistentCollection<SortedSet<E>>

clone

public PersistentSortedSet<E> clone(boolean uninitialize)
Specified by:
clone in interface PersistentCollection
Overrides:
clone in class AbstractPersistentCollection<SortedSet<E>>