ConstraintCollection
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public class ConstraintCollection implements Iterable
Represents a collection of constraints for a DataTable.
Methods
Method | Description |
---|---|
add(System.Data.Constraint constraint) | Adds the specified Constraint object to the collection. |
contains(System.Data.Constraint cc) | Indicates whether the Constraint object specified by name exists in the collection. |
get(int index) | Gets the Constraint from the collection at the specified index. |
get(String name) | Gets the Constraint from the collection with the specified name. |
getCount() | Gets the total number of elements in a collection. |
iterator() | |
remove(System.Data.Constraint constraint) | Removes the specified Constraint from the collection. |
add(System.Data.Constraint constraint)
public void add(System.Data.Constraint constraint)
Adds the specified Constraint object to the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
constraint | Constraint | The Constraint to add. |
contains(System.Data.Constraint cc)
public boolean contains(System.Data.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.
get(int index)
public System.Data.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.
get(String name)
public System.Data.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.
getCount()
public int getCount()
Gets the total number of elements in a collection.
Returns: int - The total number of elements in a collection.
iterator()
public Iterator iterator()
Returns: java.util.Iterator
remove(System.Data.Constraint constraint)
public void remove(System.Data.Constraint constraint)
Removes the specified Constraint from the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
constraint | Constraint | The Constraint to remove. |