Package org.apache.sis.util.collection
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>
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe programmatic name of the static final field holding this constant.private final shortThe resource key for the column header.private static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.util.collection.TableColumn
header, IDENTIFIER, INDEX, NAME, NAME_MAP, REMARKS, TYPE, VALUE, VALUE_AS_NUMBER, VALUE_AS_TEXT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.util.InternationalStringReturns the text to display as column header.private ObjectInvoked on deserialization for resolving this instance to one of the predefined constants.Methods inherited from class org.apache.sis.util.collection.TableColumn
getElementType, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
field
The programmatic name of the static final field holding this constant. -
resourceKey
private final transient short resourceKeyThe resource key for the column header.
-
-
Constructor Details
-
Constant
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:
getHeaderin classTableColumn<V>- Returns:
- the text to display as column header.
-
readResolve
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
-