net.walend.collection
Class MutableHashSet

java.lang.Object
  |
  +--net.walend.collection.AbstractHashSet
        |
        +--net.walend.collection.MutableHashSet
All Implemented Interfaces:
java.lang.Cloneable, Collection, HasState, MutableCollection, MutableSet, java.io.Serializable, Set

public class MutableHashSet
extends AbstractHashSet
implements MutableSet

Since:
20010409
Author:
David Walend

Field Summary
 
Fields inherited from class net.walend.collection.AbstractHashSet
serialVersionUID
 
Fields inherited from interface net.walend.collection.Set
EMPTY
 
Constructor Summary
MutableHashSet()
           
MutableHashSet(Collection collection)
           
MutableHashSet(java.util.Collection collection)
           
MutableHashSet(Identitor identitor)
           
MutableHashSet(Identitor identitor, int initialCapacity)
           
MutableHashSet(Identitor identitor, int initialCapacity, float loadFactor)
           
MutableHashSet(int siz)
           
MutableHashSet(int initialCapacity, float loadFactor)
           
 
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 class net.walend.collection.AbstractHashSet
clone, contains, containsAll, getIdentitor, getJavaCollection, getJavaSet, getPrincipleInterface, isEmpty, iterator, sameContentsAs, sameStateAs, size, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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.Set
getJavaSet
 

Constructor Detail

MutableHashSet

public MutableHashSet()

MutableHashSet

public MutableHashSet(int siz)

MutableHashSet

public MutableHashSet(int initialCapacity,
                      float loadFactor)

MutableHashSet

public MutableHashSet(Identitor identitor)

MutableHashSet

public MutableHashSet(Identitor identitor,
                      int initialCapacity)

MutableHashSet

public MutableHashSet(Identitor identitor,
                      int initialCapacity,
                      float loadFactor)

MutableHashSet

public MutableHashSet(Collection collection)

MutableHashSet

public MutableHashSet(java.util.Collection collection)
Method Detail

add

public boolean add(java.lang.Object object)
Description copied from interface: MutableCollection
Adds a Object to the MutableCollection. Sets will only add it to the Set if it's not already there.

Specified by:
add in interface MutableCollection
Overrides:
add in class AbstractHashSet
Following copied from interface: net.walend.collection.MutableCollection
Returns:
true if the MutableCollection changes, false if not.

remove

public boolean remove(java.lang.Object object)
Description copied from interface: MutableCollection
Removes a Object from the MutableCollection.

Specified by:
remove in interface MutableCollection
Overrides:
remove in class AbstractHashSet
Following copied from interface: net.walend.collection.MutableCollection
Returns:
true if the MutableCollection changes, false if not.

addAll

public boolean addAll(Collection c)
Adds all the Objects in c to this MutableCollection by using the add() method. Returns true if this MutableCollection changes.

Specified by:
addAll in interface MutableCollection
Overrides:
addAll in class AbstractHashSet

removeAll

public boolean removeAll(Collection c)
Removes all the Objects in c from this MutableCollection by using the remove() method. Returns true if this Colleciton changes.

Specified by:
removeAll in interface MutableCollection
Overrides:
removeAll in class AbstractHashSet

retainAll

public boolean retainAll(Collection c)
Retains only the Objects in this collection that are contained in c by using the contains() and remove() methods. Returns true if this Colleciton changes.

Specified by:
retainAll in interface MutableCollection
Overrides:
retainAll in class AbstractHashSet

clear

public void clear()
Description copied from interface: MutableCollection
Removes all of the Objects in this collection.

Specified by:
clear in interface MutableCollection
Overrides:
clear in class AbstractHashSet


Copyright (c) 2000, 2001, David Walend