agg.cons
Class ConstraintPriority

java.lang.Object
  extended by agg.cons.ConstraintPriority

public class ConstraintPriority
extends java.lang.Object

Constraint priority is a set of priorities of a given graph grammar. The set is backed by a hash table.


Constructor Summary
ConstraintPriority(java.util.Enumeration<Formula> constraints)
          Creates a new set of constraint priorities for a given priority graph grammar.
ConstraintPriority(java.util.List<Formula> constraints)
           
ConstraintPriority(java.util.Vector<Formula> constraints)
           
 
Method Summary
 void addPriority(Formula constraint, int prior)
          Sets the Priority of the specified constraint
 java.util.Hashtable<java.lang.Object,java.lang.Object> getConstraintPriority()
          Returns the constraint (formula) priority.
 java.lang.Integer getStartPriority()
          Returns the smallest priority of the constraint.
 java.util.Hashtable<java.lang.Integer,com.objectspace.jgl.HashSet> invertPriority()
          Inverts and returns constraint priorities so that the key is a priority and the value is a set of constraints.
 java.lang.String toString()
          Returns the constraint priority in a human readable way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintPriority

public ConstraintPriority(java.util.Enumeration<Formula> constraints)
Creates a new set of constraint priorities for a given priority graph grammar.

Parameters:
constraints - The constraints of a graph grammar.

ConstraintPriority

public ConstraintPriority(java.util.List<Formula> constraints)

ConstraintPriority

public ConstraintPriority(java.util.Vector<Formula> constraints)
Method Detail

addPriority

public void addPriority(Formula constraint,
                        int prior)
Sets the Priority of the specified constraint


getConstraintPriority

public java.util.Hashtable<java.lang.Object,java.lang.Object> getConstraintPriority()
Returns the constraint (formula) priority. The key is a constraint, priority is a priority.


getStartPriority

public java.lang.Integer getStartPriority()
Returns the smallest priority of the constraint.


invertPriority

public java.util.Hashtable<java.lang.Integer,com.objectspace.jgl.HashSet> invertPriority()
Inverts and returns constraint priorities so that the key is a priority and the value is a set of constraints.


toString

public java.lang.String toString()
Returns the constraint priority in a human readable way.

Overrides:
toString in class java.lang.Object