|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.buffalo.fs7.mathlib.VarAuthority
Class providing a filter and grouping mechanism for variables kept by a Mathlib object. It can for example be used to obtain all variables of a certain type, e.g. gates. But it also provides more complex filter rules, such as dimension constraints, or boolean expressions. For details see MathObjectConstraints.
MathObjectConstraints,
Mathlib| Field Summary | |
protected java.util.Hashtable |
categories
holds registered categories |
protected boolean |
exclusiveMode
exclusive mode |
protected Mathlib |
mathlib
holds a reference to the Mathlib object |
protected java.util.Vector |
priority
keeps record on priority of groups (first come first serve) |
protected java.util.Vector |
varsAssigned
holds references to variables already sorted into a special group (exclusive mode) |
| Constructor Summary | |
VarAuthority(Mathlib mathlib,
boolean exclusiveMode)
creates a VarAuthority object for a certain Mathlib object. |
|
| Method Summary | |
java.util.Enumeration |
getCategories()
returns the registered categories |
java.util.Enumeration |
getElementsInCategory(java.lang.String category)
returns a enumeration of variable names which match the given category. |
boolean |
isObjectInCategory(java.lang.String var,
java.lang.String subCategory,
java.lang.String category)
checks whether the given object (given by varibale & subCategory) matches the constraints of category |
void |
registerCategory(java.lang.String category,
MathObjectConstraints constraints)
registers a category |
void |
unregisterCategory(java.lang.String category)
removes a category |
java.lang.String |
whichCategory(java.lang.String variable,
java.lang.String subCategory)
returns the first matching category for the given variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Mathlib mathlib
protected java.util.Hashtable categories
protected java.util.Vector varsAssigned
protected boolean exclusiveMode
protected java.util.Vector priority
| Constructor Detail |
public VarAuthority(Mathlib mathlib,
boolean exclusiveMode)
mathlib - Mathlib object which keeps the variablesexclusiveMode - multiple group membership| Method Detail |
public java.util.Enumeration getElementsInCategory(java.lang.String category)
throws java.lang.IllegalArgumentException
category - category name
public boolean isObjectInCategory(java.lang.String var,
java.lang.String subCategory,
java.lang.String category)
variable - name of the MathObjectsubCategory - subcategory of the MathObjectcategory - category to check against
public java.lang.String whichCategory(java.lang.String variable,
java.lang.String subCategory)
public java.util.Enumeration getCategories()
public void registerCategory(java.lang.String category,
MathObjectConstraints constraints)
public void unregisterCategory(java.lang.String category)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||