Class TableColumn.Constant<V>

java.lang.Object
org.apache.sis.util.collection.TableColumn<V>
org.apache.sis.util.collection.TableColumn.Constant<V>
Type Parameters:
V - base type of all values in the column identified by this instance.
All Implemented Interfaces:
Serializable, CheckedContainer<V>
Enclosing class:
TableColumn<V>

private static final class TableColumn.Constant<V> extends TableColumn<V> implements Serializable
Implementation of TableColumn for the predefined constants. This implementation differs resource bundle loading until first needed, and resolves deserialized instances to the singleton instances.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • field

      private final String field
      The programmatic name of the static final field holding this constant.
    • resourceKey

      private final transient short resourceKey
      The resource key for the column header.
  • Constructor Details

    • Constant

      Constant(String field, Class<V> type, short header)
      Creates a new instance for a build-in constant.
      Parameters:
      field - the programmatic name of the static final field holding this constant.
      type - base type of all values in the column identified by this instance.
      header - the resource key for the column header.
  • Method Details

    • getHeader

      public org.opengis.util.InternationalString getHeader()
      Returns the text to display as column header.
      Overrides:
      getHeader in class TableColumn<V>
      Returns:
      the text to display as column header.
    • readResolve

      private Object readResolve() throws ObjectStreamException
      Invoked on deserialization for resolving this instance to one of the predefined constants.
      Returns:
      one of the predefined constants.
      Throws:
      InvalidObjectException - if this instance cannot be resolved.
      ObjectStreamException