com.groupdocs.assembly.system.data

Class DataColumnCollection

  • java.lang.Object
    • com.groupdocs.assembly.system.data.DataColumnCollection
  • All Implemented Interfaces:
    java.lang.Iterable


    public final class DataColumnCollection
    extends java.lang.Object
    implements java.lang.Iterable
    Represents a collection of DataColumn objects for a DataTable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(DataColumn column)
      Creates and adds the specified DataColumn object to the DataColumnCollection.
      void add(java.lang.String columnName)
      Creates and adds a DataColumn object that has the specified name to the DataColumnCollection.
      DataColumn add(java.lang.String columnName, java.lang.Class type)
      Creates and adds a DataColumn object that has the specified name and type to the DataColumnCollection.
      void clear()
      Clears the collection of any columns.
      boolean contains(java.lang.String name)
      Checks whether the collection contains a column with the specified name.
      DataColumn get(int index)
      Gets the DataColumn from the collection at the specified index.
      DataColumn get(java.lang.String name)
      Gets the DataColumn from the collection with the specified name.
      int getCount() 
      int indexOf(DataColumn column)
      Gets the index of a column specified by name.
      int indexOf(java.lang.String columnName)
      Gets the index of the column with the specific name (the name is not case sensitive).
      java.util.Iterator iterator() 
      void remove(java.lang.String name)
      Removes the DataColumn object that has the specified name from the collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • add

        public final void add(java.lang.String columnName)
        Creates and adds a DataColumn object that has the specified name to the DataColumnCollection.
        Parameters:
        columnName - The name of the column.
      • indexOf

        public final int indexOf(java.lang.String columnName)
        Gets the index of the column with the specific name (the name is not case sensitive).
        Parameters:
        columnName - The name of the column to find.
        Returns:
        The zero-based index of the column with the specified name, or -1 if the column does not exist in the collection.
      • indexOf

        public final int indexOf(DataColumn column)
        Gets the index of a column specified by name.
        Parameters:
        column - The name of the column to return.
        Returns:
        The index of the column specified by column if it is found; otherwise, -1.
      • get

        public final DataColumn get(int index)
        Gets the DataColumn from the collection at the specified index.
        Parameters:
        index - The zero-based index of the column to return.
        Returns:
        The DataColumn at the specified index.
      • remove

        public final void remove(java.lang.String name)
        Removes the DataColumn object that has the specified name from the collection.
        Parameters:
        name - The name of the column to remove.
      • getCount

        public final int getCount()
        Returns:
        the total number of elements in a collection.
      • iterator

        public final java.util.Iterator iterator()
        Specified by:
        iterator in interface java.lang.Iterable
      • clear

        public final void clear()
        Clears the collection of any columns.