Class ColumnOrdering


  • class ColumnOrdering
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.Integer> columns
      A list of column numbers (Integers).
      (package private) int myDirection
      See RowOrdering for possible values.
      private java.util.ArrayList<java.lang.Integer> tables
      A list of table numbers (Integers), corresponding to the columns list by position.
    • Constructor Summary

      Constructors 
      Constructor Description
      ColumnOrdering​(int direction)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addColumn​(int tableNumber, int columnNumber)
      Add a column in a table to this ColumnOrdering
      (package private) ColumnOrdering cloneMe()
      Return a clone of this ColumnOrdering
      (package private) boolean contains​(int tableNumber, int columnNumber)
      Does this ColumnOrdering contain the given column?
      (package private) int direction()
      Get the direction of this ColumnOrdering
      (package private) boolean empty()
      Tell whether this ColumnOrdering has no elements.
      (package private) boolean hasAnyOtherTable​(int tableNumber)
      Is there any table other than the given one in this ColumnOrdering?
      (package private) boolean hasTable​(int tableNumber)
      Is the given table number in this ColumnOrdering?
      (package private) boolean ordered​(int direction, int tableNumber, int columnNumber)
      Does this ColumnOrdering contain the given column in the given table in the right direction?
      (package private) void removeColumns​(int tableNumber)
      Remove all columns with the given table number
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • myDirection

        int myDirection
        See RowOrdering for possible values.
      • columns

        private final java.util.ArrayList<java.lang.Integer> columns
        A list of column numbers (Integers).
      • tables

        private final java.util.ArrayList<java.lang.Integer> tables
        A list of table numbers (Integers), corresponding to the columns list by position.
    • Constructor Detail

      • ColumnOrdering

        ColumnOrdering​(int direction)
        Parameters:
        direction - See RowOrdering for possible values
    • Method Detail

      • ordered

        boolean ordered​(int direction,
                        int tableNumber,
                        int columnNumber)
        Does this ColumnOrdering contain the given column in the given table in the right direction?
        Parameters:
        direction - See RowOrdering for possible values
        tableNumber - The number of the table in question
        columnNumber - The column number in the table (one-based)
        Returns:
        true if the column is found here in the right direction
      • contains

        boolean contains​(int tableNumber,
                         int columnNumber)
        Does this ColumnOrdering contain the given column?
        Parameters:
        tableNumber - The number of table in question
        columnNumber - The column number in the table (one-based)
        Returns:
        true if the column is found here in the right direction
      • direction

        int direction()
        Get the direction of this ColumnOrdering
      • addColumn

        void addColumn​(int tableNumber,
                       int columnNumber)
        Add a column in a table to this ColumnOrdering
        Parameters:
        tableNumber - The number of table in question
        columnNumber - The column number in the table (one-based)
      • removeColumns

        void removeColumns​(int tableNumber)
        Remove all columns with the given table number
      • empty

        boolean empty()
        Tell whether this ColumnOrdering has no elements.
      • cloneMe

        ColumnOrdering cloneMe()
        Return a clone of this ColumnOrdering
      • hasTable

        boolean hasTable​(int tableNumber)
        Is the given table number in this ColumnOrdering?
      • hasAnyOtherTable

        boolean hasAnyOtherTable​(int tableNumber)
        Is there any table other than the given one in this ColumnOrdering?
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object