- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<C>
-
- org.refcodes.tabular.AbstractHeader<T,FormattedColumn<? extends T>>
-
- org.refcodes.tabular.FormattedHeader<T>
-
- Type Parameters:
T- The type managed by theFormattedHeader.
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<FormattedColumn<? extends T>>,Collection<FormattedColumn<? extends T>>,List<FormattedColumn<? extends T>>,RandomAccess,org.refcodes.mixin.Clearable,org.refcodes.struct.Keys<String,FormattedColumn<? extends T>>,org.refcodes.struct.Keys.MutableKeys<String,FormattedColumn<? extends T>>,ColumnRow<T,FormattedColumn<? extends T>>,HeaderRow<T,FormattedColumn<? extends T>>
public class FormattedHeader<T> extends AbstractHeader<T,FormattedColumn<? extends T>> implements HeaderRow<T,FormattedColumn<? extends T>>
A list ofColumninstances, for example describing the elements of a CSV file (visually speaking the of the CSV file's header line), is represented by theFormattedHeader. TheFormattedHeaderpreserves an order for a list ofColumninstances. AFormattedHeaderprovides the semantics for relatedRowinstances.The
AbstractHeader.keySet()method must provide a predictable order as ensured by theLinkedHashSetclass as of the ordered nature of theFormattedHeader.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.refcodes.tabular.AbstractHeader
_keys
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description FormattedHeader()Instantiates a new formatted header impl.FormattedHeader(FormattedColumn<? extends T>... aHeader)Instantiates a new formatted header impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetResetEscapeCode()Gets the ANSI reset Escape-Code for thisFormattedHeaderinstance.voidsetResetEscapeCode(String aEscapeCode)Gets the ANSI reset Escape-Code for thisFormattedHeaderinstance.FormattedHeader<T>withResetEscapeCode(String aEscapeCode)Sets the ANSI reset Escape-Code for thisFormattedHeaderinstance as of the Builder-Pattern.-
Methods inherited from class org.refcodes.tabular.AbstractHeader
add, add, containsKey, delete, fromStorageString, fromStorageString, fromStorageStringRecord, fromStorageStringRow, fromStorageStrings, fromStorageStrings, fromStorageStringsRecord, fromStorageStringsRow, get, indexOf, keySet, toPrintable, toPrintable, toPrintableRecord, toPrintableRow, toRecord, toRecordIgnoreType, toRow, toRowIgnoreType, toStorageString, toStorageString, toStorageStringRecord, toStorageStringRow, toStorageStrings, toStorageStrings, toStorageStringsRecord, toStorageStringsRow, toString, values
-
Methods inherited from class java.util.ArrayList
addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.refcodes.tabular.ColumnRow
containsValue, withColumns
-
Methods inherited from interface org.refcodes.tabular.HeaderRow
fromStorageString, fromStorageString, fromStorageStringRecord, fromStorageStringRow, fromStorageStrings, fromStorageStrings, fromStorageStringsRecord, fromStorageStringsRow, indexOf, toPrintable, toPrintable, toPrintableRecord, toPrintableRow, toRecord, toRecord, toRecordIgnoreType, toRow, toRowIgnoreType, toStorageString, toStorageString, toStorageStringRecord, toStorageStringRow, toStorageStrings, toStorageStrings, toStorageStringsRecord, toStorageStringsRow
-
Methods inherited from interface org.refcodes.struct.Keys
containsKey, get, getOr, keySet, use, values
-
Methods inherited from interface java.util.List
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
-
-
-
-
Constructor Detail
-
FormattedHeader
public FormattedHeader()
Instantiates a new formatted header impl.
-
FormattedHeader
public FormattedHeader(FormattedColumn<? extends T>... aHeader)
Instantiates a new formatted header impl.- Parameters:
aHeader- the header
-
-
Method Detail
-
getResetEscapeCode
public String getResetEscapeCode()
Gets the ANSI reset Escape-Code for thisFormattedHeaderinstance. In case an ANSI Escape-Codes is set, then this ANSI Reset-Code is prepended to the according text being printed.- Returns:
- The
Stringto be used for resetting ANSI escaping.
-
setResetEscapeCode
public void setResetEscapeCode(String aEscapeCode)
Gets the ANSI reset Escape-Code for thisFormattedHeaderinstance. In case an ANSI Escape-Codes is set, then this ANSI Reset-Code is prepended to the according text being printed.- Parameters:
aEscapeCode- TheStringto be used for resetting ANSI escaping.
-
withResetEscapeCode
public FormattedHeader<T> withResetEscapeCode(String aEscapeCode)
Sets the ANSI reset Escape-Code for thisFormattedHeaderinstance as of the Builder-Pattern. In case an ANSI Escape-Codes is set, then this ANSI Reset-Code is prepended to the according text being printed.- Parameters:
aEscapeCode- TheStringto be used for resetting ANSI escaping.- Returns:
- This
FormattedHeaderinstance to continue configuration.
-
-