edu.mit.sketch.ddg
Class ConstraintList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by edu.mit.sketch.ddg.ConstraintList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class ConstraintList
extends java.util.Vector
implements java.io.Serializable

Represents a list of constraints.

ConstraintList.java Created: Sun Feb 10 19:04:00 2002

Author:
Olya Veselova
See Also:
Serialized Form

Constructor Summary
ConstraintList()
           
 
Method Summary
 java.lang.Object clone()
          Clone the list
 boolean constraintHolds(java.lang.String name, Primitive p1, Primitive p2)
          Whether a contraint with a given name between two primitives hold in the list
 ConstraintGraphEdgeList edgeList()
          From all the constraints in the list create one list of constraint edges labelled with the names of the constraints
 Constraint getConstraint(java.lang.String name)
          Returns a certain constraint (given by name) from the list.
 int numEdges()
          Return the total number of edges in all the constraints in the list
 void print(java.io.PrintStream out, boolean printDetails)
          Prints the list
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ConstraintList

public ConstraintList()
Method Detail

print

public void print(java.io.PrintStream out,
                  boolean printDetails)
Prints the list


getConstraint

public Constraint getConstraint(java.lang.String name)
Returns a certain constraint (given by name) from the list. Returns an empty constraint if the current constraint was not found


edgeList

public ConstraintGraphEdgeList edgeList()
From all the constraints in the list create one list of constraint edges labelled with the names of the constraints


numEdges

public int numEdges()
Return the total number of edges in all the constraints in the list


constraintHolds

public boolean constraintHolds(java.lang.String name,
                               Primitive p1,
                               Primitive p2)
Whether a contraint with a given name between two primitives hold in the list


clone

public java.lang.Object clone()
Clone the list

Overrides:
clone in class java.util.Vector