com.hp.hpl.guess.layout
Class OrderedSet

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended bycom.hp.hpl.guess.layout.OrderedSet
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable

public class OrderedSet
extends ArrayList
implements Serializable

OrderedSet is needed so that we can produce consistent layouts. We need a consistent order (not a particular order) in neighbor, predecessor, and successor sets as well as the sets of edges, outgoingEdges, and IncomingEdges. Notice that no particular operator has been applied to this set. The point is simply that iterators for other types of sets may return elements in a different order every time. We need to use a Set because we don't want duplicates.

Author:
Hacked by Eytan Adar for Guess
See Also:
Serialized Form

Field Summary
static OrderedSet nullValue
           
 
Constructor Summary
OrderedSet()
           
 
Method Summary
 boolean add(Object object)
           
 boolean addAll(Collection set)
           
 
Methods inherited from class java.util.ArrayList
add, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

nullValue

public static final OrderedSet nullValue
Constructor Detail

OrderedSet

public OrderedSet()
Method Detail

add

public boolean add(Object object)
Specified by:
add in interface List

addAll

public boolean addAll(Collection set)
Specified by:
addAll in interface List