Class Schema

    • Constructor Detail

      • Schema

        public Schema​(Column... columns)
        Constructs a new Schema with the specified columns.
        Parameters:
        columns - the columns of this schema
    • Method Detail

      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in this schema.
        Returns:
        the number of columns in this schema
      • getColumn

        public Column getColumn​(int index)
        Returns the column at the specified index.
        Parameters:
        index - the desired index
        Returns:
        the column at the specified index
      • indexOfColumn

        public int indexOfColumn​(String columnName)
        Returns the index of the column with the specified name or -1 if no such column exists.
        Parameters:
        columnName - the column name being looked for
        Returns:
        the index of the column with the specified name or -1 if no such column exists
      • getColumn

        public Column getColumn​(String columnName)
        Returns the column with the specified name or null if no such column exists.
        Parameters:
        columnName - the column name being looked for
        Returns:
        the column with the specified name
      • getColumnRecursively

        public List<Column> getColumnRecursively​(String columnName)
        Returns the column with the specified name recursively or the empty list if no such column exists. Note, that a breadth-first algorithm is applied. If the same column name is re-used in a sub-schema, the method will always return the path to the parent schema and not to the path to a sub-schema.
        Parameters:
        columnName - the column name being looked for
        Returns:
        The column with the specified name and the way through the schema. This will be the empty list if no column of the designated name is found.
      • getColumns

        public Column[] getColumns()
        Returns all columns of this schema.
        Returns:
        all columns of this schema
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object