T - the type of objects in the set.public class SetConstraint<T> extends AbstractPropertyConstraint implements Constraint
| Constructor and Description |
|---|
SetConstraint(java.lang.String propertyName)
Creates a new SetConstraint.
|
SetConstraint(java.lang.String propertyName,
java.util.Collection<T> values)
Creates a new SetConstraint against the provided property name with all the given values.
|
SetConstraint(java.lang.String propertyName,
java.util.Collection<T> values,
Operator operator)
Creates a new SetConstraint against the provided property name with all the given values.
|
SetConstraint(java.lang.String propertyName,
Operator operator)
Creates a new SetConstraint against the provided property name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ConstraintVisitor constraintVisitor)
Visit this range constraint.
|
void |
add(T value)
Adds a new value to this set constraint.
|
void |
addAll(java.util.Collection<T> vals)
Adds all values to the set.
|
T |
get(int index)
Gets the value at the specific location.
|
java.util.Collection<T> |
getValues()
Gets the all the values in this set.
|
void |
set(int i,
T value)
Sets the value at the specified index.
|
int |
size()
Gets the number of values in this set.
|
getPropertyNamegetOperator, isNegated, negate, setOperatorequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOperator, isNegated, negate, setOperatorpublic SetConstraint(java.lang.String propertyName)
propertyName - Name of the property being constrained.public SetConstraint(java.lang.String propertyName,
java.util.Collection<T> values)
propertyName - Name of the property being constrained.values - Collection of values to constrain the property to.public SetConstraint(java.lang.String propertyName,
Operator operator)
propertyName - Name of the property being constrained.operator - Operator that defines how this constraint is joined with other constraints.public SetConstraint(java.lang.String propertyName,
java.util.Collection<T> values,
Operator operator)
propertyName - Name of the property being constrained.values - Collection of values to constrain the property to.operator - Operator that defines how this constraint is joined with other constraints.public void add(T value)
value - Value to add.public void addAll(java.util.Collection<T> vals)
vals - Collection of values to add.public int size()
public T get(int index)
index - Index of the value to get.public void set(int i,
T value)
i - index of the value to set.value - value to set.public java.util.Collection<T> getValues()
public void accept(ConstraintVisitor constraintVisitor)
accept in interface ConstraintconstraintVisitor - the ConstraintVisitor.Copyright © 2010 - 2023 Adobe. All Rights Reserved