T - The type managed by the Column.org.refcodes.mixin.KeyAccessor<String>, org.refcodes.mixin.TypeAccessor<T>FormattedColumn<T>AbstractColumn, ColumnImpl, DateColumnImpl, ExceptionColumnImpl, FormattedColumnDecorator, FormattedColumnImpl, IntegerColumnImpl, StringColumnImpl, StringsColumnImplpublic interface Column<T> extends org.refcodes.mixin.KeyAccessor<String>, org.refcodes.mixin.TypeAccessor<T>
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object>| Modifier and Type | Method | Description |
|---|---|---|
boolean |
contains(Record<?> aRecord) |
|
T |
fromStorageString(String aStringValue) |
A
Column implementation can provide its own text exchange format
for the given objects. |
T |
fromStorageStrings(String[] aStringArray) |
A
Column implementation can provide its own text exchange format
for the given objects. |
T |
get(Record<?> aRecord) |
|
T |
remove(Record<?> aRecord) |
|
String |
toPrintable(T aValue) |
A
Column implementation can provide its own printable format of
the given objects; for example a human readable text representation of
the value (or in very specialized cases even enriched with ANSI escape
codes). |
String |
toStorageString(T aValue) |
A
Column implementation can provide its own text exchange format
for the given objects. |
String[] |
toStorageStrings(T aValue) |
A
Column implementation can provide its own text exchange format
for the given objects. |
String toStorageString(T aValue)
Column implementation can provide its own text exchange format
for the given objects. This method enables the Column to convert
a value of the given type to a String and via
fromStorageString(String) back to the value (bijective).
This method supports data sinks (such as relational databases) which
allow only a single value in a row's entry: In case T is an array type,
then the storage String representation of the elements in that
array are represented by a single returned String.
In case a data sink (such as Amazon's SimpleDb) is to be addressed which
provides dedicated support for multiple values in one row's entry, then
the method toStorageStrings(Object) may be used instead.String[] toStorageStrings(T aValue)
Column implementation can provide its own text exchange format
for the given objects. This method enables the Column to convert
a value of the given type to a String array and via
fromStorageStrings(String[]) back to the value (bijective).
This method supports data sinks (such as Amazon's SimpleDb) which provide
dedicated support for multiple values in a row's entry: In case T is an
array type, then the storage String representations of the
elements in that array may be placed in dedicated entries of the returned
String array. In case T is not an array type then the returned
String array may contain just one value.
In case data sinks (such as relational databases) are to be addressed
which allow only a single value in a row's entry, then the method
toStorageString(Object) may be used instead.T fromStorageString(String aStringValue) throws ParseException
Column implementation can provide its own text exchange format
for the given objects. This method enables the Column to convert
a String value to a value of the given type and via
toStorageString(Object) back to the String (bijective).
This method supports data sinks (such as relational databases) which
allow only a single value in a row's entry: In case T is an array type,
then the storage String representation of the elements in that
array are represented by the single passed String.
In case a data sink (such as Amazon's SimpleDb) is to be addressed which
provides dedicated support for multiple values in one row's entry, then
the method fromStorageStrings(String[]) may be used instead.aStringValue - The value to be converted to a type instance.ParseException - in case parsing the String was not
possibleT fromStorageStrings(String[] aStringArray) throws ParseException
Column implementation can provide its own text exchange format
for the given objects. This method enables the Column to convert
a String array value to a value of the given type and via
toStorageStrings(Object) back to the String array
(bijective).
This method supports data sinks (such as Amazon's SimpleDb) which provide
dedicated support for multiple values in a row's entry: In case T is an
array type, then the storage String representations of the
elements in that array may be placed in dedicated entries of the provided
String array. In case T is not an array type then the passed
String array may contain just one value.
In case data sinks (such as relational databases) are to be addressed
which allow only a single value in a row's entry, then the method
fromStorageString(String) may be used instead.aStringArray - The value to be converted to a type instance.ParseException - in case parsing the String was not
possibleString toPrintable(T aValue)
Column implementation can provide its own printable format of
the given objects; for example a human readable text representation of
the value (or in very specialized cases even enriched with ANSI escape
codes). This method enables the Column to convert a value of the
given type to a human readable text. The human readable text, in
comparison to the method Object.toString() (or
toStorageString(Object)) is not intended to be converted back to
the actual value (not bijective).
This method may be used a Header instance's method
HeaderTemplate.toPrintable(Record).aValue - the element to be converted to a human readable text.boolean contains(Record<?> aRecord)
Record contains a value identified by the
Column instance's key and where the value's type is assignable to
the Column instance's type. Only if them both criteria match,
then true is returned. False is returned if there is no such value or the
value is not assignable to the Column instance's type.aRecord - The Record which to test if there is a value
associated to the Column instance's key and if it can be
casted to the Column instance's type.Record contains a value identified by
the Column instance's key and where the value's type is
assignable to the Column instance's type.T get(Record<?> aRecord) throws ColumnMismatchException
Record identified by the
Column instance's key. In case the type of the Column
instance does not match the value's type associated with the
Column instance's key, then a ColumnMismatchException is
thrown.aRecord - The Record from which to retrieve the value
associated to the Column instances key.Record associated to the
Column instances key.ColumnMismatchException - in case the value in the Record
associated with the Column instance's key does not fit
the Column instance's type.T remove(Record<?> aRecord) throws ColumnMismatchException
Record
matching the key and the type of the Column.aRecord - The Record from which to remove the related entry.Column instance's key or
null if there was none such value found.ColumnMismatchException - in case the value in the Record
associated with the Column instance's key does not fit
the Column instance's type.Copyright © 2018. All rights reserved.