Class DataField<T>

  • Type Parameters:
    T - The type of data

    public class DataField<T>
    extends Object
    Container with data of a field.
    This class would call the supplier only once, and keep the value.
    • Method Detail

      • getTable

        public SchemaTable getTable()
        Gets definition of table.
        Returns:
        The definition of table
        See Also:
        getTableName()
      • getTableName

        public String getTableName()
        Gets name of table.
        Returns:
        the name of table
        See Also:
        getTable()
      • getColumnName

        public String getColumnName()
        Gets name of column.
        Returns:
        The name of column
        See Also:
        getColumn()
      • getData

        public T getData()
        Gets data or gets by Supplier of data. This method would call the supplier only once, and keep the value.
        Returns:
        The data this field is holding
      • getDataSupplier

        public Optional<Supplier<? extends T>> getDataSupplier()
        Gets data supplier of this field.
        Returns:
        The data supplier, may be empty
      • equals

        public boolean equals​(Object obj)
        Compares the column definition and data.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Hashes the column definition and data.
        Overrides:
        hashCode in class Object