T
- The type managed by the Column
.public class FormattedColumnDecorator<T> extends Object implements FormattedColumn<T>
org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K>, org.refcodes.mixin.KeyAccessor.KeyProperty<K>
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B>>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
Modifier | Constructor and Description |
---|---|
|
FormattedColumnDecorator(Column<T> aColumn)
Wrapper for the provided
Column decorating it with additional
ColumnSetupMetrics functionality. |
|
FormattedColumnDecorator(Column<T> aColumn,
org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Wrapper for the provided
Column and the provided
ColumnSetupMetrics decorating it with each other's additional
functionality. |
protected |
FormattedColumnDecorator(String aKey,
Class<T> aType)
Instantiates a new formatted column decorator.
|
|
FormattedColumnDecorator(String aKey,
Class<T> aType,
org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Wrapper for the provided
ColumnSetupMetrics decorating it with
additional Column functionality. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Record<?> aRecord)
|
void |
fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics) |
void |
fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics) |
void |
fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics) |
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)
|
int |
getColumnWidth() |
org.refcodes.textual.ColumnWidthType |
getColumnWidthType() |
String |
getHeaderEscapeCode() |
org.refcodes.textual.EscapeCodeFactory |
getHeaderEscapeCodeFactory() |
org.refcodes.textual.HorizAlignTextMode |
getHeaderHorizAlignTextMode() |
org.refcodes.textual.MoreTextMode |
getHeaderMoreTextMode() |
org.refcodes.textual.SplitTextMode |
getHeaderSplitTextMode() |
org.refcodes.textual.TextFormatMode |
getHeaderTextFormatMode() |
String |
getKey() |
String |
getName() |
String |
getRowEscapeCode() |
org.refcodes.textual.EscapeCodeFactory |
getRowEscapeCodeFactory() |
org.refcodes.textual.HorizAlignTextMode |
getRowHorizAlignTextMode() |
org.refcodes.textual.MoreTextMode |
getRowMoreTextMode() |
org.refcodes.textual.SplitTextMode |
getRowSplitTextMode() |
org.refcodes.textual.TextFormatMode |
getRowTextFormatMode() |
Class<T> |
getType() |
void |
hide() |
boolean |
isVisible() |
T |
remove(Record<?> aRecord)
|
void |
setColumnWidth(int aColumnWidth) |
void |
setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType) |
void |
setEscapeCode(String aEscapeCode) |
void |
setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
void |
setHeaderEscapeCode(String aEscapeCode) |
void |
setHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
void |
setHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
void |
setHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
void |
setHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
void |
setHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
void |
setHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
void |
setMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
void |
setName(String aName) |
void |
setRowEscapeCode(String aEscapeCode) |
void |
setRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
void |
setRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
void |
setRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
void |
setRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
void |
setRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
void |
setSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
void |
setTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
void |
setVisible(boolean isVisible) |
void |
show() |
String |
toHeaderEscapeCode(Object aIdentifier) |
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 |
toRowEscapeCode(Object aIdentifier) |
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. |
org.refcodes.textual.ColumnSetupMetrics |
withColumnWidth(int aColumnWidth) |
org.refcodes.textual.ColumnSetupMetrics |
withColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType) |
org.refcodes.textual.ColumnSetupMetrics |
withEscapeCode(String aEscapeCode) |
org.refcodes.textual.ColumnSetupMetrics |
withEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderEscapeCode(String aEscapeCode) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
org.refcodes.textual.ColumnSetupMetrics |
withHide() |
org.refcodes.textual.ColumnSetupMetrics |
withHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withName(String aName) |
org.refcodes.textual.ColumnSetupMetrics |
withRowEscapeCode(String aEscapeCode) |
org.refcodes.textual.ColumnSetupMetrics |
withRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory) |
org.refcodes.textual.ColumnSetupMetrics |
withRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
org.refcodes.textual.ColumnSetupMetrics |
withShow() |
org.refcodes.textual.ColumnSetupMetrics |
withSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode) |
org.refcodes.textual.ColumnSetupMetrics |
withTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode) |
org.refcodes.textual.ColumnSetupMetrics |
withVisible(boolean isVisible) |
protected FormattedColumnDecorator(String aKey, Class<T> aType)
aKey
- the a keyaType
- the a typepublic FormattedColumnDecorator(Column<T> aColumn)
Column
decorating it with additional
ColumnSetupMetrics
functionality.aColumn
- The Column
to be decorated.public FormattedColumnDecorator(String aKey, Class<T> aType, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
ColumnSetupMetrics
decorating it with
additional Column
functionality.aKey
- The key for the Column
.aType
- The type to be used.aColumnSetupMetrics
- The ColumnSetupMetrics
to be
decorated.public FormattedColumnDecorator(Column<T> aColumn, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Column
and the provided
ColumnSetupMetrics
decorating it with each other's additional
functionality.aColumn
- The Column
to be decorated.aColumnSetupMetrics
- The ColumnSetupMetrics
to be
decorated.public String getName()
getName
in interface org.refcodes.mixin.NameAccessor
public boolean isVisible()
isVisible
in interface org.refcodes.graphical.VisibleAccessor
public int getColumnWidth()
getColumnWidth
in interface org.refcodes.mixin.ColumnWidthAccessor
public org.refcodes.textual.ColumnSetupMetrics withVisible(boolean isVisible)
withVisible
in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<org.refcodes.textual.ColumnSetupMetrics>
withVisible
in interface org.refcodes.textual.ColumnSetupMetrics
public void setName(String aName)
setName
in interface org.refcodes.mixin.NameAccessor.NameMutator
public void setVisible(boolean isVisible)
setVisible
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
public void setColumnWidth(int aColumnWidth)
setColumnWidth
in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
public org.refcodes.textual.ColumnSetupMetrics withName(String aName)
withName
in interface org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.textual.ColumnSetupMetrics>
withName
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withColumnWidth(int aColumnWidth)
withColumnWidth
in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<org.refcodes.textual.ColumnWidthMetrics>
withColumnWidth
in interface org.refcodes.textual.ColumnFormatMetrics
withColumnWidth
in interface org.refcodes.textual.ColumnSetupMetrics
public void show()
show
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
public org.refcodes.textual.ColumnSetupMetrics withShow()
withShow
in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<org.refcodes.textual.ColumnSetupMetrics>
withShow
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnWidthType getColumnWidthType()
getColumnWidthType
in interface org.refcodes.textual.ColumnWidthMetrics
public void hide()
hide
in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
public org.refcodes.textual.ColumnSetupMetrics withHide()
withHide
in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<org.refcodes.textual.ColumnSetupMetrics>
withHide
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withEscapeCode(String aEscapeCode)
withEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
withEscapeCode
in interface org.refcodes.textual.ColumnSetupMetrics
public void setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
setColumnWidthType
in interface org.refcodes.textual.ColumnWidthMetrics
public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCode(String aEscapeCode)
withHeaderEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderEscapeCode
in interface org.refcodes.textual.ColumnSetupMetrics
public void fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics)
fromColumnWidthMetrics
in interface org.refcodes.textual.ColumnWidthMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCode(String aEscapeCode)
withRowEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
withRowEscapeCode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
withColumnWidthType
in interface org.refcodes.textual.ColumnFormatMetrics
withColumnWidthType
in interface org.refcodes.textual.ColumnSetupMetrics
withColumnWidthType
in interface org.refcodes.textual.ColumnWidthMetrics
public org.refcodes.textual.ColumnSetupMetrics withHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
withHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withHorizAlignTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
withHorizAlignTextMode
in interface org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
public org.refcodes.textual.ColumnSetupMetrics withHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
withHeaderHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderHorizAlignTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
withRowHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withRowHorizAlignTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
withMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withMoreTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
withMoreTextMode
in interface org.refcodes.textual.MoreTextModeAccessor.MoreTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
public org.refcodes.textual.ColumnSetupMetrics withHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
withHeaderMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderMoreTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public void setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
setEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
withRowMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withRowMoreTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
withTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
withTextFormatMode
in interface org.refcodes.textual.ColumnSetupMetrics
withTextFormatMode
in interface org.refcodes.textual.TextFormatModeAccessor.TextFormatModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
public org.refcodes.textual.ColumnSetupMetrics withSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
withSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withSplitTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
withSplitTextMode
in interface org.refcodes.textual.SplitTextModeAccessor.SplitTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
public org.refcodes.textual.ColumnSetupMetrics withHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
withHeaderSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderSplitTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
withRowSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
withRowSplitTextMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
withHeaderTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderTextFormatMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
withRowTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
withRowTextFormatMode
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
withEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
withEscapeCodeFactory
in interface org.refcodes.textual.ColumnSetupMetrics
public void setHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
setHeaderEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
withHeaderEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
withHeaderEscapeCodeFactory
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
withRowEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
withRowEscapeCodeFactory
in interface org.refcodes.textual.ColumnSetupMetrics
public org.refcodes.textual.EscapeCodeFactory getHeaderEscapeCodeFactory()
getHeaderEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
public void fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
fromColumnSetupMetrics
in interface org.refcodes.textual.ColumnSetupMetrics
public String toHeaderEscapeCode(Object aIdentifier)
toHeaderEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
setRowEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.EscapeCodeFactory getRowEscapeCodeFactory()
getRowEscapeCodeFactory
in interface org.refcodes.textual.ColumnFormatMetrics
public String toRowEscapeCode(Object aIdentifier)
toRowEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setEscapeCode(String aEscapeCode)
setEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setHeaderEscapeCode(String aEscapeCode)
setHeaderEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public String getHeaderEscapeCode()
getHeaderEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowEscapeCode(String aEscapeCode)
setRowEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public String getRowEscapeCode()
getRowEscapeCode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
setHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
setHorizAlignTextMode
in interface org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeMutator
public void setHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
setHeaderHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.HorizAlignTextMode getHeaderHorizAlignTextMode()
getHeaderHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
setRowHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.HorizAlignTextMode getRowHorizAlignTextMode()
getRowHorizAlignTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
setMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
setMoreTextMode
in interface org.refcodes.textual.MoreTextModeAccessor.MoreTextModeMutator
public void setHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
setHeaderMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.MoreTextMode getHeaderMoreTextMode()
getHeaderMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
setRowMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.MoreTextMode getRowMoreTextMode()
getRowMoreTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
setTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
setTextFormatMode
in interface org.refcodes.textual.TextFormatModeAccessor.TextFormatModeMutator
public void setSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
setSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
setSplitTextMode
in interface org.refcodes.textual.SplitTextModeAccessor.SplitTextModeMutator
public void setHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
setHeaderSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.SplitTextMode getHeaderSplitTextMode()
getHeaderSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
setRowSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.SplitTextMode getRowSplitTextMode()
getRowSplitTextMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
setHeaderTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.TextFormatMode getHeaderTextFormatMode()
getHeaderTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void setRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
setRowTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
public org.refcodes.textual.TextFormatMode getRowTextFormatMode()
getRowTextFormatMode
in interface org.refcodes.textual.ColumnFormatMetrics
public void fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics)
fromColumnFormatMetrics
in interface org.refcodes.textual.ColumnFormatMetrics
public Class<T> getType()
getType
in interface org.refcodes.mixin.TypeAccessor<T>
public String getKey()
getKey
in interface org.refcodes.mixin.KeyAccessor<String>
public String toStorageString(T aValue)
Column
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
Column.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 Column.toStorageStrings(Object)
may be used instead.toStorageString
in interface Column<T>
aValue
- the element to be converted to a String
.String
representation of the value.public String[] toStorageStrings(T aValue)
Column
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
Column.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
Column.toStorageString(Object)
may be used instead.toStorageStrings
in interface Column<T>
aValue
- the element to be converted to a String
array.String
array representation of the value.public T fromStorageString(String aStringValue) throws ParseException
Column
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
Column.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 Column.fromStorageStrings(String[])
may be used instead.fromStorageString
in interface Column<T>
aStringValue
- The value to be converted to a type instance.ParseException
- in case parsing the String
was not
possiblepublic T fromStorageStrings(String[] aStringArray) throws ParseException
Column
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
Column.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
Column.fromStorageString(String)
may be used instead.fromStorageStrings
in interface Column<T>
aStringArray
- The value to be converted to a type instance.ParseException
- in case parsing the String
was not
possiblepublic String toPrintable(T aValue)
Column
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
Column.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)
.toPrintable
in interface Column<T>
aValue
- the element to be converted to a human readable text.public boolean contains(Record<?> aRecord)
Column
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.contains
in interface Column<T>
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.public T get(Record<?> aRecord) throws ColumnMismatchException
Column
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.get
in interface Column<T>
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.public T remove(Record<?> aRecord) throws ColumnMismatchException
Column
Record
matching the key and the type of the Column
.remove
in interface Column<T>
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 © 2017. All rights reserved.