public class BasicConstraint extends Object implements RelationConstraint
Modifier and Type | Field and Description |
---|---|
static double |
NO_MAX_CONSTRAINT
Use this constant to specify no maximum constraint
for a particular relation.
|
static double |
NO_MIN_CONSTRAINT
Use this to constant specify no minimum constraint
for a particular relation.
|
Constructor and Description |
---|
BasicConstraint(Relation r,
double minVal,
double maxVal)
Create the constraints object with the given relations and
given min/max constraints.
|
Modifier and Type | Method and Description |
---|---|
static void |
debug(String s)
Debugging output.
|
static double |
parseMinMax(String s)
Parse a number string, NO_MIN, or NO_MAX into the corresponding
range boundary.
|
static String |
printMinMax(double d)
Parse a number string, NO_MIN, or NO_MAX into the corresponding
range boundary.
|
boolean |
test(SceneElement e1,
SceneElement e2)
Test the constraint on the given elements; return true if
all constraints are met, false otherwise.
|
String |
toString()
Print out the contents of this constraint.
|
String |
toString(String e1Name,
String e2Name)
Print out the contents of this constraint in
a grammar format.
|
public static double NO_MAX_CONSTRAINT
public static double NO_MIN_CONSTRAINT
public BasicConstraint(Relation r, double minVal, double maxVal)
public static void debug(String s)
public static double parseMinMax(String s)
public static String printMinMax(double d)
public boolean test(SceneElement e1, SceneElement e2)
test
in interface RelationConstraint
public String toString(String e1Name, String e2Name)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.