T
- The type managed by the HeaderTemplate
.C
- the generic typepublic interface HeaderTemplate<T,C extends Column<? extends T>> extends ColumnsTemplate<T,C>, List<C>
Column
instances, for example describing the elements of a
CSV file (visually speaking the of the CSV file's header line), is
represented by the HeaderTemplate
. The
HeaderTemplate
preserves an order for a list of
Column
instances. A
HeaderTemplate
provides the semantics for
related Row
instances.
The Keys.keySet()
method must provide a predictable order as ensured by
the LinkedHashSet
class as of the ordered nature of the
HeaderTemplate
.
Modifier and Type | Method and Description |
---|---|
Record<T> |
fromStorageString(Record<String> aStringRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<T> |
fromStorageString(Row<String> aStringRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<T> |
fromStorageStringRecord(Record<String> aStringRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<T> |
fromStorageStringRow(Row<String> aStringRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<T> |
fromStorageStrings(Record<String[]> aStringsRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<T> |
fromStorageStrings(Row<String[]> aStringsRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<T> |
fromStorageStringsRecord(Record<String[]> aStringsRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<T> |
fromStorageStringsRow(Row<String[]> aStringsRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
int |
indexOf(String aKey)
Determines the index of the column with the given key or -1 if there is
none such column.
|
Record<String> |
toPrintable(Record<? extends T> aRecord)
A special
Column implementation might 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). |
Row<String> |
toPrintable(Row<? extends T> aRow)
A special
Column implementation might 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). |
Record<String> |
toPrintableRecord(Row<? extends T> aRow)
A special
Column implementation might 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). |
Row<String> |
toPrintableRow(Record<? extends T> aRecord)
A special
Column implementation might 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). |
Record<T> |
toRecord(Row<? extends T> aRow)
|
Record<?> |
toRecordIgnoreType(Row<?> aRow)
Similar to
toRecord(Row) with the difference that conversion is
done ignoring the type of the HeaderTemplate Column
instances and the according value(s). |
Row<T> |
toRow(Record<? extends T> aRecord)
|
Row<?> |
toRowIgnoreType(Record<?> aRecord)
Similar to
toRow(Record) with the difference that conversion is
done ignoring the type of the HeaderTemplate Column
instances and the according value(s). |
Record<String> |
toStorageString(Record<? extends T> aRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<String> |
toStorageString(Row<? extends T> aRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<String> |
toStorageStringRecord(Row<? extends T> aRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<String> |
toStorageStringRow(Record<? extends T> aRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<String[]> |
toStorageStrings(Record<? extends T> aRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<String[]> |
toStorageStrings(Row<? extends T> aRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Record<String[]> |
toStorageStringsRecord(Row<? extends T> aRow)
A special
Column implementation might provide its own text
exchange format for the given objects. |
Row<String[]> |
toStorageStringsRow(Record<? extends T> aRecord)
A special
Column implementation might provide its own text
exchange format for the given objects. |
containsValue, withColumns
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
int indexOf(String aKey)
aKey
- The key for which to get the column index.Row<T> toRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Row
of the Record
with the values in the order
of the HeaderTemplate
. This method is kind of "strong typed" as
any type mismatch between the Column
defined in the
HeaderTemplate
and the according value of the Record
we
get a ColumnMismatchException
.aRecord
- The Record
to use when creating the Row
.Row
according to the Column
instances of the
HeaderTemplate
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<?> toRowIgnoreType(Record<?> aRecord) throws HeaderMismatchException
toRow(Record)
with the difference that conversion is
done ignoring the type of the HeaderTemplate
Column
instances and the according value(s).aRecord
- The Record
to use when creating the Row
.Row
according to the Column
instances of the
HeaderTemplate
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.Record<T> toRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Record
of the Row
with the values in the order
of the HeaderTemplate
. This method is kind of "strong typed" as
any type mismatch between the Column
defined in the
HeaderTemplate
and the according value of the Row
we get
a ColumnMismatchException
.aRow
- The Record
to use when creating the Record
.Row
according to the Column
instances of the
HeaderTemplate
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<?> toRecordIgnoreType(Row<?> aRow) throws HeaderMismatchException
toRecord(Row)
with the difference that conversion is
done ignoring the type of the HeaderTemplate
Column
instances and the according value(s).aRow
- The Record
to use when creating the Record
.Row
according to the Column
instances of the
HeaderTemplate
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.Row<String> toStorageString(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
of the given type to a
Row
containing only String
values and via
fromStorageString(Row)
back to the actual Row
(bijective).
This method may use a Column
instance's method
Column.toStorageString(Object)
.aRow
- the Row
to be converted to a String
Row
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<T> fromStorageString(Row<String> aStringRow) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
containing only
String
objects to a Row
with the given types and via
toStorageString(Row)
back to the String
Row
(bijective).
This method may use a Column
instance's method
Column.fromStorageString(String)
.aStringRow
- the String
Row
to be converted to a
type Row
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Record<String> toStorageString(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
of the given type to a
Record
containing only String
values and via
fromStorageString(Record)
back to the actual Record
(bijective).
This method may use a Column
instance's method
Column.toStorageString(Object)
.aRecord
- the Record
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given Columns
and the Row
, i.e. the
index for the given key in the header may be out of index of the
given row or the given key does not exist in the
HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<T> fromStorageString(Record<String> aStringRecord) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
containing only
String
objects to a Record
with the given types and via
toStorageString(Record)
back to the String
Record
(bijective).
This method may use a Column
instance's method
Column.fromStorageString(String)
.aStringRecord
- the String
Record
to be converted to
a type Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given Columns
and the Row
, i.e. the
index for the given key in the header may be out of index of the
given row or the given key does not exist in the
HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Row<String[]> toStorageStrings(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
of the given type to a
Row
containing only String
arrays and via
fromStorageStrings(Row)
back to the actual Row
(bijective).
This method may use a Column
instance's method
Column.toStorageStrings(Object)
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aRow
- the Row
to be converted to a String
Row
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<T> fromStorageStrings(Row<String[]> aStringsRow) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
containing only
String
objects to a Row
with the given types and via
toStorageStrings(Row)
back to the String
array
Row
(bijective).
This method may use a Column
instance's method
Column.fromStorageStrings(String[])
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aStringsRow
- the String
array Row
to be converted
to a type Row
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Record<String[]> toStorageStrings(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
of the given type to a
Record
containing only String
arrays and via
fromStorageStrings(Record)
back to the actual Record
(bijective).
This method may use a Column
instance's method
Column.toStorageStrings(Object)
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aRecord
- the Record
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given Columns
and the Row
, i.e. the
index for the given key in the header may be out of index of the
given row or the given key does not exist in the
HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<T> fromStorageStrings(Record<String[]> aStringsRecord) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
containing only
String
objects to a Record
with the given types and via
toStorageStrings(Record)
back to the String
Record
(bijective).
This method may use a Column
instance's method
Column.fromStorageStrings(String[])
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aStringsRecord
- the String
array Record
to be
converted to a type Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given Columns
and the Row
, i.e. the
index for the given key in the header may be out of index of the
given row or the given key does not exist in the
HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Record<String> toPrintable(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might 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 HeaderTemplate
to convert a value of the given type to a human readable text. The human
readable text, in comparison to the method
toStorageString(Record)
(or toStorageStrings(Record)
)
is not intended to be converted back to the actual value (not bijective).
This method may use a Column
instance's method
Column.toPrintable(Object)
; it also might enrich the output of
the Column.toPrintable(Object)
with device specific additional
data such as ANSI Escape-Codes and with information regarding the
Record
as a whole and not just be regarding a single value.aRecord
- the Record
to be converted to a human readable
text Record
.Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given Columns
and the Row
, i.e. the
index for the given key in the header may be out of index of the
given row or the given key does not exist in the
HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<String> toPrintable(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might 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 HeaderTemplate
to convert a value of the given type to a human readable text. The human
readable text, in comparison to the method toStorageString(Row)
(or toStorageStrings(Row)
) is not intended to be converted back
to the actual value (not bijective).
This method may use a Column
instance's method
Column.toPrintable(Object)
; it also might enrich the output of
the Column.toPrintable(Object)
with device specific additional
data such as ANSI Escape-Codes and with information regarding the
Row
as a whole and not just be regarding a single value.aRow
- the Row
to be converted to a human readable text
Row
.Row
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<T> fromStorageStringRecord(Record<String> aStringRecord) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
containing only
String
objects to a Row
with the given types and via
toStorageStringRecord(Row)
back to the String
Record
(bijective).
This method may use a Column
instance's method
Column.fromStorageString(String)
.aStringRecord
- the String
Record
to be converted to
a type Row
.Row
representation of the String
Record
.ParseException
- in case parsing the input was not possibleHeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.Record<String> toStorageStringRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
of the given type to a
Record
containing only String
values and via
fromStorageStringRecord(Record)
back to the actual Row
(bijective).
This method may use a Column
instance's method
Column.toStorageString(Object)
.aRow
- The Row
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<T> fromStorageStringRow(Row<String> aStringRow) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
containing only
String
objects to a Record
with the given types and via
toStorageStringRow(Record)
back to the String
Row
(bijective).
This method may use a Column
instance's method
Column.fromStorageString(String)
.aStringRow
- the String
Row
to be converted to a
type Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Row<String> toStorageStringRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
of the given type to a
Row
containing only String
values and via
fromStorageStringRecord(Record)
back to the actual
Record
(bijective).
This method may use a Column
instance's method
Column.toStorageString(Object)
.aRecord
- The Row
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<T> fromStorageStringsRecord(Record<String[]> aStringsRecord) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
containing only
String
arrays to a Row
with the given types and via
toStorageStringsRecord(Row)
back to the String
Record
(bijective).
This method may use a Column
instance's method
Column.fromStorageStrings(String[])
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aStringsRecord
- the String
Record
to be converted
to a type Row
.Row
representation of the String
Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ParseException
- in case parsing the input was not possibleRecord<String[]> toStorageStringsRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
of the given type to a
Record
containing only String
arrays and via
fromStorageStringsRecord(Record)
back to the actual Row
(bijective).
This method may use a Column
instance's method
Column.toStorageStrings(Object)
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aRow
- The Row
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<T> fromStorageStringsRow(Row<String[]> aStringsRow) throws HeaderMismatchException, ParseException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Row
containing only
String
arrays to a Record
with the given types and via
toStorageStringsRow(Record)
back to the String
Row
(bijective).
This method may use a Column
instance's method
Column.fromStorageStrings(String[])
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aStringsRow
- the String
Row
to be converted to a
type Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ParseException
- in case parsing the input was not possibleUnsupportedOperationException
- in case this operation is not
supported.Row<String[]> toStorageStringsRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might provide its own text
exchange format for the given objects. This method enables the
HeaderTemplate
to convert a Record
of the given type to a
Row
containing only String
arrays and via
fromStorageStringsRecord(Record)
back to the actual
Record
(bijective).
This method may use a Column
instance's method
Column.toStorageStrings(Object)
.
Supporting String
arrays enables to address data sinks which
support multiple values in one filed (for example some NoSQL databases
such as Amazon's simple DB supports multiple values in one row's entry).aRecord
- The Row
to be converted to a String
Record
.String
representation of the value.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Row<String> toPrintableRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might 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 HeaderTemplate
to convert a value of the given type to a human readable text. The human
readable text, in comparison to the method toRow(Record)
(or
toStorageStringsRecord(Row)
is not intended to be converted back
to the actual value (not bijective).
This method may use a Column
instance's method
Column.toPrintable(Object)
; it also might enrich the output of
the Column.toPrintable(Object)
with device specific additional
data such as ANSI Escape-Codes and with information regarding the
Record
as a whole and not just be regarding a single value.aRecord
- the Record
to be converted to a human readable
text Row
.Row
representation of the
Record
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Record
of the wrong type than specified by a
Column
of the HeaderTemplate
.Record<String> toPrintableRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException
Column
implementation might 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 HeaderTemplate
to convert a Row
of the given type to a human readable text
Record
. The human readable text, in comparison to the method
toStorageString(Row)
(or toRecordIgnoreType(Row)
) is
not intended to be converted back to the actual value (not bijective).
This method may use a Column
instance's method
Column.toPrintable(Object)
; it also might enrich the output of
the Column.toPrintable(Object)
with device specific additional
data such as ANSI Escape-Codes and with information regarding the
Row
as a whole and not just be regarding a single value.aRow
- the Row
to be converted to a human readable text
Record
.Record
representation of the
Row
.HeaderMismatchException
- Thrown in case there is a mismatch
between the given HeaderMismatchException
and the
Row
, i.e. the index for the given key in the header may
be out of index of the given row or the given key does not exist
in the HeaderTemplate
.ColumnMismatchException
- Thrown in case a value was found in the
e.g. in a Row
of the wrong type than specified by a
Column
of the HeaderTemplate
.Copyright © 2017. All rights reserved.