ConstraintCollection
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public class ConstraintCollection implements Iterable<Constraint>
Represents a collection of constraints for a DataTable.
| Method | Description |
|---|---|
| get(String constraintName) | Gets the Constraint from the collection with the specified name. |
| get(int idx) | |
| 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 Constraint get(String constraintName)
Gets the Constraint from the collection with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| constraintName | java.lang.String | name of the constraint in this collection |
Returns: Constraint - constraint by its name or null if not found.
public Constraint get(int idx)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| idx | int |
Returns: Constraint
public void add(Constraint constraint)
Adds the specified Constraint object to the collection.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| constraint | Constraint | The Constraint to add. |
public void remove(Constraint constraint)
Removes the specified Constraint from the collection.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| constraint | Constraint | The Constraint to remove. |
public 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 int getCount()
Gets the total number of elements in a collection.
Returns: int - The total number of elements in a collection.
public Iterator<Constraint> iterator()
Returns: java.util.Iterator<com.groupdocs.assembly.system.data.Constraint>
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.