public class ConstraintGroup extends AbstractConstraint implements Constraint
Constructor and Description |
---|
ConstraintGroup()
Construct a new ConstraintGroup.
|
ConstraintGroup(Operator operator)
Construct a new ConstraintGroup with the given operator.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ConstraintVisitor constraintVisitor)
Visit this constraint group.
|
void |
addConstraint(Constraint constraint)
Add a constraint to the group.
|
void |
and(Constraint constraint)
Add a constraint to the group, joined with an AND operator.
|
java.util.Collection<Constraint> |
getConstraints()
Return the collection of constraints in this group.
|
boolean |
hasConstraints()
Return true if this group has constraints.
|
void |
or(Constraint constraint)
Add a constraint to the group, joined with an OR operator.
|
getOperator, isNegated, negate, setOperator
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperator, isNegated, negate, setOperator
public ConstraintGroup()
public ConstraintGroup(Operator operator)
operator
- the operator for this group.public void and(Constraint constraint)
constraint
- the constraint to add.public void or(Constraint constraint)
constraint
- the constraint to add.public void addConstraint(Constraint constraint)
constraint
- the constraint to add.public java.util.Collection<Constraint> getConstraints()
public void accept(ConstraintVisitor constraintVisitor)
accept
in interface Constraint
constraintVisitor
- the ConstraintVisitor.public boolean hasConstraints()
Copyright © 2010 - 2020 Adobe. All Rights Reserved