org.xmlcml.tools
Interface ToolHashSet

All Known Subinterfaces:
AtomSet, BondSet, ChainSet, Ring, RingNucleus
All Known Implementing Classes:
ToolHashSetImpl

public interface ToolHashSet
extends java.lang.Cloneable

has to provide the functionality of HashSet


Method Summary
 boolean add(java.lang.Object o)
          add element (cf HashSet)
 boolean addAll(java.util.Collection c)
          add Collection (cf HashSet)
 ToolHashSet and(ToolHashSet h)
          ToolHashSet containing elements common to this and h
 java.lang.Object clone()
          shallow copy
 boolean contains(java.lang.Object o)
          does this contain an element?
 void debug()
           
 java.util.Iterator iterator()
          create an Iterator
 ToolHashSet not(ToolHashSet h)
          ToolHashSet containing elements in this but not h
 ToolHashSet or(ToolHashSet h)
          ToolHashSet containing elements in either this and h
 boolean remove(java.lang.Object o)
          remove element (cf HashSet)
 boolean removeAll(java.util.Collection c)
          remove just those elements in Collection (cf HashSet)
 boolean retainAll(java.util.Collection c)
          retain just those elements in Collection (cf HashSet)
 int size()
          size of Set
 ToolHashSet xor(ToolHashSet h)
          ToolHashSet containing elements in this or h but not both
 

Method Detail

debug

public void debug()

and

public ToolHashSet and(ToolHashSet h)
ToolHashSet containing elements common to this and h
Returns:
ToolHashSet union of this/h

or

public ToolHashSet or(ToolHashSet h)
ToolHashSet containing elements in either this and h
Returns:
ToolHashSet

not

public ToolHashSet not(ToolHashSet h)
ToolHashSet containing elements in this but not h
Returns:
ToolHashSet

xor

public ToolHashSet xor(ToolHashSet h)
ToolHashSet containing elements in this or h but not both
Returns:
ToolHashSet

contains

public boolean contains(java.lang.Object o)
does this contain an element?
Parameters:
Object - o is this in Set?
Returns:
boolean true if contains Object

add

public boolean add(java.lang.Object o)
add element (cf HashSet)
Parameters:
Object - o to add

remove

public boolean remove(java.lang.Object o)
remove element (cf HashSet)
Parameters:
Object - o to remove

addAll

public boolean addAll(java.util.Collection c)
add Collection (cf HashSet)
Parameters:
Collection - c to add

retainAll

public boolean retainAll(java.util.Collection c)
retain just those elements in Collection (cf HashSet)
Parameters:
Collection - c to retain

removeAll

public boolean removeAll(java.util.Collection c)
remove just those elements in Collection (cf HashSet)
Parameters:
Collection - c to remove

clone

public java.lang.Object clone()
shallow copy
Overrides:
clone in class java.lang.Object

iterator

public java.util.Iterator iterator()
create an Iterator
Returns:
Iterator

size

public int size()
size of Set