Interface HeaderRow<T,C extends Column<? extends T>>
- Type Parameters:
T- The type managed by theHeaderRow.C- the generic type
- All Superinterfaces:
org.refcodes.mixin.Clearable,Collection<C>,ColumnRow<T,,C> Iterable<C>,org.refcodes.struct.Keys<String,,C> org.refcodes.struct.Keys.MutableKeys<String,,C> List<C>,SequencedCollection<C>
- All Known Subinterfaces:
Header<T>
- All Known Implementing Classes:
AbstractHeader,FormattedHeader,HeaderImpl,StringHeader
A list of
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 HeaderRow. The
HeaderRow preserves an order for a list of
Column instances. A
HeaderRow 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
HeaderRow.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.struct.Keys
org.refcodes.struct.Keys.MutableKeys<K,V>, org.refcodes.struct.Keys.MutableValues<K, V> -
Method Summary
Modifier and TypeMethodDescriptionfromStorageString(Record<String> aStringRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageString(Row<String> aStringRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStringRecord(Record<String> aStringRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStringRow(Row<String> aStringRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStrings(Record<String[]> aStringsRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStrings(Row<String[]> aStringsRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStringsRecord(Record<String[]> aStringsRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.fromStorageStringsRow(Row<String[]> aStringsRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.intDetermines the index of the column with the given key or -1 if there is none such column.toPrintable(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes).toPrintable(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes).toPrintableRecord(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes).toPrintableRow(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes).Record<?> toRecordIgnoreType(Row<?> aRow) Similar totoRecord(Row)with the difference that conversion is done ignoring the type of theHeaderRowColumninstances and the according value(s).Row<?> toRowIgnoreType(Record<?> aRecord) Similar totoRow(Record)with the difference that conversion is done ignoring the type of theHeaderRowColumninstances and the according value(s).toStorageString(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageString(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStringRecord(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStringRow(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStrings(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStrings(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStringsRecord(Row<? extends T> aRow) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.toStorageStringsRow(Record<? extends T> aRecord) A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects.Methods inherited from interface org.refcodes.mixin.Clearable
clearMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.refcodes.tabular.ColumnRow
containsValue, withColumnsMethods inherited from interface org.refcodes.struct.Keys
containsKey, get, getOr, keySet, use, valuesMethods inherited from interface org.refcodes.struct.Keys.MutableKeys
deleteMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
indexOf
Determines the index of the column with the given key or -1 if there is none such column.- Parameters:
aKey- The key for which to get the column index.- Returns:
- The index or -1 if there is none such column.
-
toRow
Creates aRowof theRecordwith the values in the order of theHeaderRow. This method is kind of "strong typed" as any type mismatch between theColumndefined in theHeaderRowand the according value of theRecordwe get aColumnMismatchException.- Parameters:
aRecord- TheRecordto use when creating theRow.- Returns:
- The
Rowaccording to theColumninstances of theHeaderRow. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
toRowIgnoreType
Similar totoRow(Record)with the difference that conversion is done ignoring the type of theHeaderRowColumninstances and the according value(s).- Parameters:
aRecord- TheRecordto use when creating theRow.- Returns:
- The
Rowaccording to theColumninstances of theHeaderRow. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.
-
toRecord
Creates aRecordof theRowwith the values in the order of theHeaderRow. This method is kind of "strong typed" as any type mismatch between theColumndefined in theHeaderRowand the according value of theRowwe get aColumnMismatchException.- Parameters:
aRow- TheRecordto use when creating theRecord.- Returns:
- The
Rowaccording to theColumninstances of theHeaderRow. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
toRecord
- Parameters:
aRecord- TheStringarray to convert.- Returns:
- The accordingly created
Record; - Throws:
HeaderMismatchException- thrown in case there is a mismatch between the givenHeaderand aRow(or anotherHeader), i.e. the index for the given key in a header may be out of index of a given row or the given key does not exist in aHeader.ParseException- in case parsing the input was not possible
-
toRecordIgnoreType
Similar totoRecord(Row)with the difference that conversion is done ignoring the type of theHeaderRowColumninstances and the according value(s).- Parameters:
aRow- TheRecordto use when creating theRecord.- Returns:
- The
Rowaccording to theColumninstances of theHeaderRow. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.
-
toStorageString
Row<String> toStorageString(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowof the given type to aRowcontaining onlyStringvalues and viafromStorageString(Row)back to the actualRow(bijective). This method may use aColumninstance's methodColumn.toStorageString(Object).- Parameters:
aRow- theRowto be converted to aStringRow.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageString
A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowcontaining onlyStringobjects to aRowwith the given types and viatoStorageString(Row)back to theStringRow(bijective). This method may use aColumninstance's methodColumn.fromStorageString(String).- Parameters:
aStringRow- theStringRowto be converted to a typeRow.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toStorageString
Record<String> toStorageString(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordof the given type to aRecordcontaining onlyStringvalues and viafromStorageString(Record)back to the actualRecord(bijective). This method may use aColumninstance's methodColumn.toStorageString(Object).- Parameters:
aRecord- theRecordto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenColumnsand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageString
Record<T> fromStorageString(Record<String> aStringRecord) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordcontaining onlyStringobjects to aRecordwith the given types and viatoStorageString(Record)back to theStringRecord(bijective). This method may use aColumninstance's methodColumn.fromStorageString(String).- Parameters:
aStringRecord- theStringRecordto be converted to a typeRecord.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenColumnsand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toStorageStrings
Row<String[]> toStorageStrings(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowof the given type to aRowcontaining onlyStringarrays and viafromStorageStrings(Row)back to the actualRow(bijective). This method may use aColumninstance's methodColumn.toStorageStrings(Object). SupportingStringarrays 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).- Parameters:
aRow- theRowto be converted to aStringRow.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStrings
A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowcontaining onlyStringobjects to aRowwith the given types and viatoStorageStrings(Row)back to theStringarrayRow(bijective). This method may use aColumninstance's methodColumn.fromStorageStrings(String[]). SupportingStringarrays 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).- Parameters:
aStringsRow- theStringarrayRowto be converted to a typeRow.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toStorageStrings
Record<String[]> toStorageStrings(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordof the given type to aRecordcontaining onlyStringarrays and viafromStorageStrings(Record)back to the actualRecord(bijective). This method may use aColumninstance's methodColumn.toStorageStrings(Object). SupportingStringarrays 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).- Parameters:
aRecord- theRecordto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenColumnsand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStrings
Record<T> fromStorageStrings(Record<String[]> aStringsRecord) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordcontaining onlyStringobjects to aRecordwith the given types and viatoStorageStrings(Record)back to theStringRecord(bijective). This method may use aColumninstance's methodColumn.fromStorageStrings(String[]). SupportingStringarrays 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).- Parameters:
aStringsRecord- theStringarrayRecordto be converted to a typeRecord.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenColumnsand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toPrintable
Record<String> toPrintable(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes). This method enables theHeaderRowto convert a value of the given type to a human readable text. The human readable text, in comparison to the methodtoStorageString(Record)(ortoStorageStrings(Record)) is not intended to be converted back to the actual value (not bijective). This method may use aColumninstance's methodColumn.toPrintable(Object); it also might enrich the output of theColumn.toPrintable(Object)with device specific additional data such as ANSI Escape-Codes and with information regarding theRecordas a whole and not just be regarding a single value.- Parameters:
aRecord- theRecordto be converted to a human readable textRecord.- Returns:
- The human readable representation of the
Record. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenColumnsand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
toPrintable
Row<String> toPrintable(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes). This method enables theHeaderRowto convert a value of the given type to a human readable text. The human readable text, in comparison to the methodtoStorageString(Row)(ortoStorageStrings(Row)) is not intended to be converted back to the actual value (not bijective). This method may use aColumninstance's methodColumn.toPrintable(Object); it also might enrich the output of theColumn.toPrintable(Object)with device specific additional data such as ANSI Escape-Codes and with information regarding theRowas a whole and not just be regarding a single value.- Parameters:
aRow- theRowto be converted to a human readable textRow.- Returns:
- The human readable representation of the
Row. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStringRecord
Row<T> fromStorageStringRecord(Record<String> aStringRecord) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordcontaining onlyStringobjects to aRowwith the given types and viatoStorageStringRecord(Row)back to theStringRecord(bijective). This method may use aColumninstance's methodColumn.fromStorageString(String).- Parameters:
aStringRecord- theStringRecordto be converted to a typeRow.- Returns:
- The type
Rowrepresentation of theStringRecord. - Throws:
ParseException- in case parsing the input was not possibleHeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.
-
toStorageStringRecord
Record<String> toStorageStringRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowof the given type to aRecordcontaining onlyStringvalues and viafromStorageStringRecord(Record)back to the actualRow(bijective). This method may use aColumninstance's methodColumn.toStorageString(Object).- Parameters:
aRow- TheRowto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStringRow
Record<T> fromStorageStringRow(Row<String> aStringRow) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowcontaining onlyStringobjects to aRecordwith the given types and viatoStorageStringRow(Record)back to theStringRow(bijective). This method may use aColumninstance's methodColumn.fromStorageString(String).- Parameters:
aStringRow- theStringRowto be converted to a typeRecord.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toStorageStringRow
Row<String> toStorageStringRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordof the given type to aRowcontaining onlyStringvalues and viafromStorageStringRecord(Record)back to the actualRecord(bijective). This method may use aColumninstance's methodColumn.toStorageString(Object).- Parameters:
aRecord- TheRowto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStringsRecord
Row<T> fromStorageStringsRecord(Record<String[]> aStringsRecord) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordcontaining onlyStringarrays to aRowwith the given types and viatoStorageStringsRecord(Row)back to theStringRecord(bijective). This method may use aColumninstance's methodColumn.fromStorageStrings(String[]). SupportingStringarrays 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).- Parameters:
aStringsRecord- theStringRecordto be converted to a typeRow.- Returns:
- The type
Rowrepresentation of theStringRecord. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possible
-
toStorageStringsRecord
Record<String[]> toStorageStringsRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowof the given type to aRecordcontaining onlyStringarrays and viafromStorageStringsRecord(Record)back to the actualRow(bijective). This method may use aColumninstance's methodColumn.toStorageStrings(Object). SupportingStringarrays 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).- Parameters:
aRow- TheRowto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-
fromStorageStringsRow
Record<T> fromStorageStringsRow(Row<String[]> aStringsRow) throws HeaderMismatchException, ParseException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRowcontaining onlyStringarrays to aRecordwith the given types and viatoStorageStringsRow(Record)back to theStringRow(bijective). This method may use aColumninstance's methodColumn.fromStorageStrings(String[]). SupportingStringarrays 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).- Parameters:
aStringsRow- theStringRowto be converted to a typeRecord.- Returns:
- The type representation of the value.
- Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ParseException- in case parsing the input was not possibleUnsupportedOperationException- in case this operation is not supported.
-
toStorageStringsRow
Row<String[]> toStorageStringsRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own text exchange format for the given objects. This method enables theHeaderRowto convert aRecordof the given type to aRowcontaining onlyStringarrays and viafromStorageStringsRecord(Record)back to the actualRecord(bijective). This method may use aColumninstance's methodColumn.toStorageStrings(Object). SupportingStringarrays 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).- Parameters:
aRecord- TheRowto be converted to aStringRecord.- Returns:
- The
Stringrepresentation of the value. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
toPrintableRow
Row<String> toPrintableRow(Record<? extends T> aRecord) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes). This method enables theHeaderRowto convert a value of the given type to a human readable text. The human readable text, in comparison to the methodtoRow(Record)(ortoStorageStringsRecord(Row)is not intended to be converted back to the actual value (not bijective). This method may use aColumninstance's methodColumn.toPrintable(Object); it also might enrich the output of theColumn.toPrintable(Object)with device specific additional data such as ANSI Escape-Codes and with information regarding theRecordas a whole and not just be regarding a single value.- Parameters:
aRecord- theRecordto be converted to a human readable textRow.- Returns:
- The human readable
Rowrepresentation of theRecord. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRecordof the wrong type than specified by aColumnof theHeaderRow.
-
toPrintableRecord
Record<String> toPrintableRecord(Row<? extends T> aRow) throws HeaderMismatchException, ColumnMismatchException A https://www.metacodes.proColumnimplementation might provide its own printable format of the given objects; for example a human readable text representation of the value (or in very https://www.metacodes.proized cases even enriched with ANSI Escape-Codes). This method enables theHeaderRowto convert aRowof the given type to a human readable textRecord. The human readable text, in comparison to the methodtoStorageString(Row)(ortoRecordIgnoreType(Row)) is not intended to be converted back to the actual value (not bijective). This method may use aColumninstance's methodColumn.toPrintable(Object); it also might enrich the output of theColumn.toPrintable(Object)with device specific additional data such as ANSI Escape-Codes and with information regarding theRowas a whole and not just be regarding a single value.- Parameters:
aRow- theRowto be converted to a human readable textRecord.- Returns:
- The human readable
Recordrepresentation of theRow. - Throws:
HeaderMismatchException- Thrown in case there is a mismatch between the givenHeaderMismatchExceptionand theRow, 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 theHeaderRow.ColumnMismatchException- Thrown in case a value was found in the e.g. in aRowof the wrong type than specified by aColumnof theHeaderRow.
-