DataTableCollection
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public class DataTableCollection implements Iterable
Represents the collection of tables for the DataSet.
Methods
Method | Description |
---|---|
add(System.Data.DataTable table) | Adds the specified DataTable to the collection. |
add(String name) | Creates a DataTable object by using the specified name and adds it to the collection. |
contains(String name) | Gets a value that indicates whether a DataTable object with the specified name exists in the collection. |
get(int index) | Gets the DataTable object at the specified index. |
get(String name) | Gets the DataTable object with the specified name. |
get(String name, String tableNamespace) | Gets the DataTable object with the specified name in the specified namespace. |
getCount() | |
iterator() | |
remove(String name) | Removes the DataTable object with the specified name from the collection. |
add(System.Data.DataTable table)
public void add(System.Data.DataTable table)
Adds the specified DataTable to the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
table | DataTable | The DataTable object to add. |
add(String name)
public System.Data.DataTable add(String name)
Creates a DataTable object by using the specified name and adds it to the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name to give the created DataTable. |
Returns: DataTable - The newly created DataTable.
contains(String name)
public boolean contains(String name)
Gets a value that indicates whether a DataTable object with the specified name exists in the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the DataTable to find. |
Returns: boolean - true if the specified table exists; otherwise false.
get(int index)
public System.Data.DataTable get(int index)
Gets the DataTable object at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the DataTable to find. |
Returns: DataTable - A DataTable.
get(String name)
public System.Data.DataTable get(String name)
Gets the DataTable object with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the DataTable to find. |
Returns: DataTable - A DataTable with the specified name; otherwise null if the DataTable does not exist.
get(String name, String tableNamespace)
public System.Data.DataTable get(String name, String tableNamespace)
Gets the DataTable object with the specified name in the specified namespace.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the DataTable to find. |
tableNamespace | java.lang.String | The name of the DataTable namespace to look in. |
Returns: DataTable - A DataTable with the specified name; otherwise null if the DataTable does not exist.
getCount()
public int getCount()
Returns: int - total number of items in this collection.
iterator()
public Iterator iterator()
Returns: java.util.Iterator
remove(String name)
public System.Data.DataTable remove(String name)
Removes the DataTable object with the specified name from the collection.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name of the DataTable object to remove. |
Returns: DataTable