net.sf.taverna.t2.partition
Class HashSetModel<ItemType>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<ItemType>
              extended by net.sf.taverna.t2.partition.HashSetModel<ItemType>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<ItemType>, java.util.Collection<ItemType>, java.util.Set<ItemType>, SetModel<ItemType>

public class HashSetModel<ItemType>
extends java.util.HashSet<ItemType>
implements SetModel<ItemType>

Implementation of SetModel based on a HashSet

Author:
Tom Oinn
See Also:
Serialized Form

Constructor Summary
HashSetModel()
          Default constructor, creates a set model based on a HashSet
 
Method Summary
 boolean add(ItemType item)
           
 void addSetModelChangeListener(SetModelChangeListener<ItemType> listener)
          Implements SetModel
 void clear()
           
 boolean remove(java.lang.Object item)
           
 void removeSetModelChangeListener(SetModelChangeListener<ItemType> listener)
          Implements SetModel
 
Methods inherited from class java.util.HashSet
clone, contains, isEmpty, iterator, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

HashSetModel

public HashSetModel()
Default constructor, creates a set model based on a HashSet

Method Detail

addSetModelChangeListener

public void addSetModelChangeListener(SetModelChangeListener<ItemType> listener)
Implements SetModel

Specified by:
addSetModelChangeListener in interface SetModel<ItemType>

removeSetModelChangeListener

public void removeSetModelChangeListener(SetModelChangeListener<ItemType> listener)
Implements SetModel

Specified by:
removeSetModelChangeListener in interface SetModel<ItemType>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<ItemType>
Specified by:
clear in interface java.util.Set<ItemType>
Overrides:
clear in class java.util.HashSet<ItemType>

add

public boolean add(ItemType item)
Specified by:
add in interface java.util.Collection<ItemType>
Specified by:
add in interface java.util.Set<ItemType>
Overrides:
add in class java.util.HashSet<ItemType>

remove

public boolean remove(java.lang.Object item)
Specified by:
remove in interface java.util.Collection<ItemType>
Specified by:
remove in interface java.util.Set<ItemType>
Overrides:
remove in class java.util.HashSet<ItemType>