|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Use this interface for changable CollectionOfFreezables.
Use a direct implementation of this interface, like Bag, to handle a multiset.
All implementations of lyophil.collection.MutableCollectionOfFreezables should include three standard constructors: a no-argument constructor, a constructor with an initial size, and a constructor with the single argument Collection (or a sub interface) which creates a copy of the argument.
lyophil.collection.MutableCollectionOfFreezables implementations should not mess with the normal java equals() and hashCode() methods. Doing so prevents creating a Map of dynamic Sets, critical for an in-memory Freezer.
Implementations of these interfaces should generally go back to the Freezer for Freezables.
Method Summary | |
boolean |
addAllIdentifiedBy(Collection c)
Adds all the Freezables identified by c to this MutableCollection using the addIdentifiedBy method. |
boolean |
addIdentifiedBy(java.io.Serializable id)
Adds a Freezable to the MutableCollection. |
boolean |
removeAllIdentifiedBy(Collection c)
Removes all the Freezables identified by c from this MutableCollection using the removeIdentifiedBy method. |
boolean |
removeIdentifiedBy(java.io.Serializable id)
Removes a Freezable from the MutableCollection, based on that Freezable's identifier. |
boolean |
retainAllIdentifiedBy(Collection c)
Removes all but the Freezables identified by c from this MutableCollection using the removeIdentifiedBy method. |
Methods inherited from interface net.walend.lyophil.collection.CollectionOfFreezables |
containsAllIdentifiedBy, containsIdentifiedBy, freezableIterator, getIdentifiers, identifierIterator |
Methods inherited from interface net.walend.collection.Collection |
contains, containsAll, getIdentitor, getJavaCollection, isEmpty, iterator, sameContentsAs, size |
Methods inherited from interface net.walend.collection.HasState |
getPrincipleInterface, sameStateAs |
Methods inherited from interface net.walend.collection.MutableCollection |
add, addAll, clear, remove, removeAll, retainAll |
Method Detail |
public boolean addIdentifiedBy(java.io.Serializable id)
java.lang.ClassCastException
- class of the specified element prevents it from being
added to this collection.java.lang.IllegalArgumentException
- some aspect of this element prevents it from being
added to this collection.ZombieIdentifierException
- if f is not in the Freezer and this implementation checks on add.public boolean removeIdentifiedBy(java.io.Serializable id)
public boolean addAllIdentifiedBy(Collection c)
java.lang.ClassCastException
- if the class of an element of the specified collection prevents it from being
added to this collection.java.lang.IllegalArgumentException
- some aspect of an element of the specified collection prevents it from being
added to this collection.public boolean removeAllIdentifiedBy(Collection c)
java.lang.ClassCastException
- if the class of an element of the specified collection prevents it from being
added to this collection.java.lang.IllegalArgumentException
- some aspect of an element of the specified collection prevents it from being
added to this collection.public boolean retainAllIdentifiedBy(Collection c)
java.lang.ClassCastException
- if the class of an element of the specified collection prevents it from being
added to this collection.java.lang.IllegalArgumentException
- some aspect of an element of the specified collection prevents it from being
added to this collection.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |