org.springframework.datastore.collection
Class PersistentSet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet
org.springframework.datastore.collection.PersistentSet
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, Set, PersistentCollection
public class PersistentSet
- extends HashSet
- implements PersistentCollection
A lazy loaded set
- Since:
- 1.0
- See Also:
- Serialized Form
PersistentSet
public PersistentSet(Serializable associationKey,
Session session,
AssociationIndexer indexer)
isInitialized
public boolean isInitialized()
- Description copied from interface:
PersistentCollection
- Check whether the collection has been loaded
- Specified by:
isInitialized
in interface PersistentCollection
- Returns:
- True if the collection has been initialized
initialize
public void initialize()
- Description copied from interface:
PersistentCollection
- Initializes the collection if it hasn't already been initialized
- Specified by:
initialize
in interface PersistentCollection
toString
public String toString()
- Overrides:
toString
in class AbstractCollection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- Specified by:
iterator
in interface Set
- Overrides:
iterator
in class HashSet
size
public int size()
- Specified by:
size
in interface Collection
- Specified by:
size
in interface Set
- Overrides:
size
in class HashSet
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
- Specified by:
isEmpty
in interface Set
- Overrides:
isEmpty
in class HashSet
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
- Specified by:
contains
in interface Set
- Overrides:
contains
in class HashSet
add
public boolean add(Object o)
- Specified by:
add
in interface Collection
- Specified by:
add
in interface Set
- Overrides:
add
in class HashSet
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection
- Specified by:
remove
in interface Set
- Overrides:
remove
in class HashSet
clear
public void clear()
- Specified by:
clear
in interface Collection
- Specified by:
clear
in interface Set
- Overrides:
clear
in class HashSet
clone
public Object clone()
- Overrides:
clone
in class HashSet
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Collection
- Specified by:
equals
in interface Set
- Overrides:
equals
in class AbstractSet
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection
- Specified by:
hashCode
in interface Set
- Overrides:
hashCode
in class AbstractSet
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll
in interface Collection
- Specified by:
removeAll
in interface Set
- Overrides:
removeAll
in class AbstractSet
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
- Specified by:
toArray
in interface Set
- Overrides:
toArray
in class AbstractCollection
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interface Collection
- Specified by:
toArray
in interface Set
- Overrides:
toArray
in class AbstractCollection
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll
in interface Collection
- Specified by:
containsAll
in interface Set
- Overrides:
containsAll
in class AbstractCollection
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interface Collection
- Specified by:
addAll
in interface Set
- Overrides:
addAll
in class AbstractCollection
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll
in interface Collection
- Specified by:
retainAll
in interface Set
- Overrides:
retainAll
in class AbstractCollection