|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Use this interface for changable Collections of Objects.
Use a direct implementation of this interface, like Bag, to handle a multiset.
All implementations of javasupport.collection.MutableCollection should include four standard constructors: a no-argument constructor, a constructor with an initial size, a constructor with the single argument Collection (or a sub interface) which creates a copy of the argument, and a constructor with the single argument java.util.Collection.
MutableCollection implementations should not mess with the normal java equals() and hashCode() methods. Doing so prevents creating a Map of dynamic Sets.
Method Summary | |
boolean |
add(java.lang.Object object)
Adds a Object to the MutableCollection. |
boolean |
addAll(Collection c)
Adds all the Objects in c to this MutableCollection by using the add() method. |
void |
clear()
Removes all of the Objects in this collection. |
boolean |
remove(java.lang.Object object)
Removes a Object from the MutableCollection. |
boolean |
removeAll(Collection c)
Removes all the Objects in c from this MutableCollection by using the remove() method. |
boolean |
retainAll(Collection c)
Retains only the Objects in this collection that are contained in c by using the contains() and remove() methods. |
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 |
Method Detail |
public boolean add(java.lang.Object object)
public boolean remove(java.lang.Object object)
public boolean addAll(Collection c)
public boolean removeAll(Collection c)
public boolean retainAll(Collection c)
public void clear()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |