Class FormattedHeader<T>
java.lang.Object
java.util.AbstractCollection<FormattedColumn<? extends T>>
java.util.AbstractList<FormattedColumn<? extends T>>
java.util.ArrayList<FormattedColumn<? extends T>>
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, SequencedCollection<FormattedColumn<? extends T>>, Clearable, Keys<String, FormattedColumn<? extends T>>, Keys.MutableKeys<String, FormattedColumn<? extends T>>, ColumnRow<T, FormattedColumn<? extends T>>, HeaderRow<T, FormattedColumn<? extends T>>
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 FormattedHeader. The
FormattedHeader preserves an order for a list of
Column instances. A
FormattedHeader provides the semantics for
related Row instances.
The AbstractHeader.keySet() method must provide a predictable order as ensured by
the LinkedHashSet class as of the ordered nature of the
FormattedHeader.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Keys
Keys.MutableKeys<K,V>, Keys.MutableValues<K, V> -
Field Summary
Fields inherited from class AbstractHeader
_keysFields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new formatted header impl.FormattedHeader(FormattedColumn<? extends T>... aHeader) Instantiates the classFormattedHeader. -
Method Summary
Modifier and TypeMethodDescriptionGets the ANSI reset Escape-Code for thisFormattedHeaderinstance.voidsetResetEscapeCode(String aEscapeCode) Gets the ANSI reset Escape-Code for thisFormattedHeaderinstance.withResetEscapeCode(String aEscapeCode) Sets the ANSI reset Escape-Code for thisFormattedHeaderinstance as of the Builder-Pattern.Methods inherited from class 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, valuesMethods inherited from class ArrayList
addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAllMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface ColumnRow
containsValue, withColumnsMethods inherited from interface List
addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
FormattedHeader
public FormattedHeader()Instantiates a new formatted header impl. -
FormattedHeader
Instantiates the classFormattedHeader.- See Also:
-
-
Method Details
-
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
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
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.
-