ConstraintCollection
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public final class ConstraintCollection implements Iterable
Represents a collection of constraints for a DataTable.
| 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() |
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.
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.
public final void add(Constraint constraint)
Adds the specified Constraint object to the collection.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| constraint | Constraint | The Constraint to add. |
public final void remove(Constraint constraint)
Removes the specified Constraint from the collection.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| constraint | Constraint | The Constraint to remove. |
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.
public final int getCount()
Gets the total number of elements in a collection.
Returns: int - The total number of elements in a collection.
public final Iterator iterator()
Returns: java.util.Iterator
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.