edu.byu.ece.edif.util.graph
Class MultipleInstanceCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<E>
              extended by java.util.LinkedHashSet<EdifCellInstance>
                  extended by edu.byu.ece.edif.util.graph.MultipleInstanceCollection
All Implemented Interfaces:
EdifCellInstanceCollection, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<EdifCellInstance>, java.util.Collection<EdifCellInstance>, java.util.Set<EdifCellInstance>

public class MultipleInstanceCollection
extends java.util.LinkedHashSet<EdifCellInstance>
implements EdifCellInstanceCollection

See Also:
Serialized Form

Field Summary
private  int _id
           
private static int _instantiationCount
           
 
Constructor Summary
MultipleInstanceCollection()
           
MultipleInstanceCollection(java.util.Collection c)
           
MultipleInstanceCollection(EdifCellInstanceCollection ecic)
           
MultipleInstanceCollection(EdifCellInstanceCollection c1, EdifCellInstanceCollection c2)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          The equals method should work the same as the hashCode method.
 int hashCode()
          The default hashCode() method does not return the same value if this Collection is changed.
private  void readObject(java.io.ObjectInputStream in)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

_id

private int _id

_instantiationCount

private static int _instantiationCount
Constructor Detail

MultipleInstanceCollection

public MultipleInstanceCollection()

MultipleInstanceCollection

public MultipleInstanceCollection(java.util.Collection c)

MultipleInstanceCollection

public MultipleInstanceCollection(EdifCellInstanceCollection ecic)

MultipleInstanceCollection

public MultipleInstanceCollection(EdifCellInstanceCollection c1,
                                  EdifCellInstanceCollection c2)
Method Detail

hashCode

public int hashCode()
The default hashCode() method does not return the same value if this Collection is changed. This overriding method ensures that each MultipleInstanceCollection object has a unique, unchanging hash code.

Specified by:
hashCode in interface java.util.Collection<EdifCellInstance>
Specified by:
hashCode in interface java.util.Set<EdifCellInstance>
Overrides:
hashCode in class java.util.AbstractSet<EdifCellInstance>

equals

public boolean equals(java.lang.Object obj)
The equals method should work the same as the hashCode method. Make sure the object is of this type as well, just in case the fabricated hashCodes happen to match others.

Specified by:
equals in interface java.util.Collection<EdifCellInstance>
Specified by:
equals in interface java.util.Set<EdifCellInstance>
Overrides:
equals in class java.util.AbstractSet<EdifCellInstance>

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection<EdifCellInstance>

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException