ConstraintCollection
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public final class ConstraintCollection implements Iterable
Represents a collection of constraints for a DataTable.
Methods
Method | Description |
---|---|
get(String name) | Gets the Constraint from the collection with the specified name. |
get(int index) | Gets the Constraint from the collection at the specified index. |
add(Constraint constraint) | Adds the specified Constraint object to the collection. |
remove(Constraint constraint) | Removes the specified Constraint from the collection. |
contains(Constraint cc) | Indicates whether the Constraint object specified by name exists in the collection. |
getCount() | Gets the total number of elements in a collection. |
iterator() |
get(String name)
public final Constraint get(String name)
Gets the Constraint from the collection with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The Constraint.getConstraintName() / Constraint.setConstraintName(java.lang.String) of the constraint to return. |
Returns: Constraint - The Constraint with the specified name; otherwise a null value if the Constraint does not exist.
get(int index)
public final Constraint get(int index)
Gets the Constraint from the collection at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | The index of the constraint to return. |
Returns: Constraint - The Constraint at the specified index.
add(Constraint constraint)
public final void add(Constraint constraint)
Adds the specified Constraint object to the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
constraint | Constraint | The Constraint to add. |
remove(Constraint constraint)
public final void remove(Constraint constraint)
Removes the specified Constraint from the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
constraint | Constraint | The Constraint to remove. |
contains(Constraint cc)
public final boolean contains(Constraint cc)
Indicates whether the Constraint object specified by name exists in the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
cc | Constraint | The Constraint to remove. |
Returns: boolean - true if the collection contains the specified constraint; otherwise, false.
getCount()
public final int getCount()
Gets the total number of elements in a collection.
Returns: int - The total number of elements in a collection.
iterator()
public final Iterator iterator()
Returns: java.util.Iterator