|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConstraints.SiteConstraints
public class SiteConstraints
Stores the constraints for a single site
Constructor Summary | |
---|---|
SiteConstraints(java.util.List<java.lang.String> allStates)
Standard constructor that creates an object with no constraints |
Method Summary | |
---|---|
void |
addConstraint(java.lang.String n,
java.util.Set<java.lang.String> c)
Adds a constraint |
void |
addConstraint(java.lang.String n,
java.lang.String c)
Adds a constraint where a node is constrained to a single state |
SiteConstraints |
clone()
|
java.util.Set<java.lang.String> |
getConstraint(java.lang.String n)
Gets the constraints for a node |
boolean |
meetsConstrains(Site s)
Tests whether a given site (that should include data for internal nodes) meets the defined constraints |
boolean |
nodeIsConstrained(java.lang.String n)
Tests whether a node has a constraint |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SiteConstraints(java.util.List<java.lang.String> allStates)
allStates
- The set of all possible statesMethod Detail |
---|
public void addConstraint(java.lang.String n, java.lang.String c)
n
- The nodec
- The state it is constrained topublic void addConstraint(java.lang.String n, java.util.Set<java.lang.String> c)
n
- The node to add the constraint toc
- The states the node is constrained topublic java.util.Set<java.lang.String> getConstraint(java.lang.String n)
n
- The node to get constraints for
public boolean meetsConstrains(Site s)
s
- The site
public boolean nodeIsConstrained(java.lang.String n)
n
- The node
public SiteConstraints clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |