- java.lang.Object
-
- org.refcodes.tabular.FormattedColumnDecorator<T>
-
- Type Parameters:
T
- The type managed by theColumn
.
- All Implemented Interfaces:
org.refcodes.graphical.VisibleAccessor
,org.refcodes.graphical.VisibleAccessor.VisibleBuilder<org.refcodes.textual.ColumnSetupMetrics>
,org.refcodes.graphical.VisibleAccessor.VisibleMutator
,org.refcodes.graphical.VisibleAccessor.VisibleProperty
,org.refcodes.mixin.ColumnWidthAccessor
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<org.refcodes.textual.ColumnWidthMetrics>
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
,org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
,org.refcodes.mixin.KeyAccessor<String>
,org.refcodes.mixin.NameAccessor
,org.refcodes.mixin.NameAccessor.NameBuilder<org.refcodes.textual.ColumnSetupMetrics>
,org.refcodes.mixin.NameAccessor.NameMutator
,org.refcodes.mixin.NameAccessor.NameProperty
,org.refcodes.mixin.TypeAccessor<T>
,Column<T>
,FormattedColumn<T>
,org.refcodes.textual.ColumnFormatMetrics
,org.refcodes.textual.ColumnSetupMetrics
,org.refcodes.textual.ColumnWidthMetrics
,org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
,org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeMutator
,org.refcodes.textual.MoreTextModeAccessor.MoreTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
,org.refcodes.textual.MoreTextModeAccessor.MoreTextModeMutator
,org.refcodes.textual.SplitTextModeAccessor.SplitTextModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
,org.refcodes.textual.SplitTextModeAccessor.SplitTextModeMutator
,org.refcodes.textual.TextFormatModeAccessor.TextFormatModeBuilder<org.refcodes.textual.ColumnFormatMetrics>
,org.refcodes.textual.TextFormatModeAccessor.TextFormatModeMutator
- Direct Known Subclasses:
FormattedColumnImpl
public class FormattedColumnDecorator<T> extends Object implements FormattedColumn<T>
Decorator implementation of the HeaderSetupMetrics interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ColumnWidthAccessor
org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B extends org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<B>>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.graphical.VisibleAccessor
org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B extends org.refcodes.graphical.VisibleAccessor.VisibleBuilder<B>>, org.refcodes.graphical.VisibleAccessor.VisibleMutator, org.refcodes.graphical.VisibleAccessor.VisibleProperty
-
-
Constructor Summary
Constructors Modifier Constructor Description 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 providedColumnSetupMetrics
decorating it with additionalColumn
functionality.FormattedColumnDecorator(Column<T> aColumn)
Wrapper for the providedColumn
decorating it with additionalColumnSetupMetrics
functionality.FormattedColumnDecorator(Column<T> aColumn, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Wrapper for the providedColumn
and the providedColumnSetupMetrics
decorating it with each other's additional functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
AColumn
implementation can provide its own text exchange format for the given objects.T
fromStorageStrings(String[] aStringArray)
AColumn
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)
AColumn
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)
AColumn
implementation can provide its own text exchange format for the given objects.String[]
toStorageStrings(T aValue)
AColumn
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)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.tabular.Column
getValue, toStorageString_
-
-
-
-
Constructor Detail
-
FormattedColumnDecorator
protected FormattedColumnDecorator(String aKey, Class<T> aType)
Instantiates a new formatted column decorator.- Parameters:
aKey
- the keyaType
- the type
-
FormattedColumnDecorator
public FormattedColumnDecorator(Column<T> aColumn)
Wrapper for the providedColumn
decorating it with additionalColumnSetupMetrics
functionality.- Parameters:
aColumn
- TheColumn
to be decorated.
-
FormattedColumnDecorator
public FormattedColumnDecorator(String aKey, Class<T> aType, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Wrapper for the providedColumnSetupMetrics
decorating it with additionalColumn
functionality.- Parameters:
aKey
- The key for theColumn
.aType
- The type to be used.aColumnSetupMetrics
- TheColumnSetupMetrics
to be decorated.
-
FormattedColumnDecorator
public FormattedColumnDecorator(Column<T> aColumn, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
Wrapper for the providedColumn
and the providedColumnSetupMetrics
decorating it with each other's additional functionality.- Parameters:
aColumn
- TheColumn
to be decorated.aColumnSetupMetrics
- TheColumnSetupMetrics
to be decorated.
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
-
isVisible
public boolean isVisible()
- Specified by:
isVisible
in interfaceorg.refcodes.graphical.VisibleAccessor
-
getColumnWidth
public int getColumnWidth()
- Specified by:
getColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor
-
withVisible
public org.refcodes.textual.ColumnSetupMetrics withVisible(boolean isVisible)
- Specified by:
withVisible
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withVisible
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
-
setName
public void setName(String aName)
- Specified by:
setName
in interfaceorg.refcodes.mixin.NameAccessor.NameMutator
-
setVisible
public void setVisible(boolean isVisible)
- Specified by:
setVisible
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleMutator
-
setColumnWidth
public void setColumnWidth(int aColumnWidth)
- Specified by:
setColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
-
withName
public org.refcodes.textual.ColumnSetupMetrics withName(String aName)
- Specified by:
withName
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withName
in interfaceorg.refcodes.mixin.NameAccessor.NameBuilder<T>
-
withColumnWidth
public org.refcodes.textual.ColumnSetupMetrics withColumnWidth(int aColumnWidth)
- Specified by:
withColumnWidth
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withColumnWidth
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withColumnWidth
in interfaceorg.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<T>
-
show
public void show()
- Specified by:
show
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleMutator
-
withShow
public org.refcodes.textual.ColumnSetupMetrics withShow()
- Specified by:
withShow
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withShow
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
-
getColumnWidthType
public org.refcodes.textual.ColumnWidthType getColumnWidthType()
- Specified by:
getColumnWidthType
in interfaceorg.refcodes.textual.ColumnWidthMetrics
-
hide
public void hide()
- Specified by:
hide
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleMutator
-
withHide
public org.refcodes.textual.ColumnSetupMetrics withHide()
- Specified by:
withHide
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withHide
in interfaceorg.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
-
withEscapeCode
public org.refcodes.textual.ColumnSetupMetrics withEscapeCode(String aEscapeCode)
- Specified by:
withEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withEscapeCode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
setColumnWidthType
public void setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
- Specified by:
setColumnWidthType
in interfaceorg.refcodes.textual.ColumnWidthMetrics
-
withHeaderEscapeCode
public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCode(String aEscapeCode)
- Specified by:
withHeaderEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderEscapeCode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
fromColumnWidthMetrics
public void fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics)
- Specified by:
fromColumnWidthMetrics
in interfaceorg.refcodes.textual.ColumnWidthMetrics
-
withRowEscapeCode
public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCode(String aEscapeCode)
- Specified by:
withRowEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowEscapeCode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withColumnWidthType
public org.refcodes.textual.ColumnSetupMetrics withColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
- Specified by:
withColumnWidthType
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withColumnWidthType
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withColumnWidthType
in interfaceorg.refcodes.textual.ColumnWidthMetrics
-
withHorizAlignTextMode
public org.refcodes.textual.ColumnSetupMetrics withHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
withHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withHorizAlignTextMode
in interfaceorg.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeBuilder<T>
-
withHeaderHorizAlignTextMode
public org.refcodes.textual.ColumnSetupMetrics withHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
withHeaderHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withRowHorizAlignTextMode
public org.refcodes.textual.ColumnSetupMetrics withRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
withRowHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withMoreTextMode
public org.refcodes.textual.ColumnSetupMetrics withMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
withMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withMoreTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withMoreTextMode
in interfaceorg.refcodes.textual.MoreTextModeAccessor.MoreTextModeBuilder<T>
-
withHeaderMoreTextMode
public org.refcodes.textual.ColumnSetupMetrics withHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
withHeaderMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderMoreTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
setEscapeCodeFactory
public void setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
setEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
withRowMoreTextMode
public org.refcodes.textual.ColumnSetupMetrics withRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
withRowMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowMoreTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withTextFormatMode
public org.refcodes.textual.ColumnSetupMetrics withTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
withTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withTextFormatMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withTextFormatMode
in interfaceorg.refcodes.textual.TextFormatModeAccessor.TextFormatModeBuilder<T>
-
withSplitTextMode
public org.refcodes.textual.ColumnSetupMetrics withSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
withSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withSplitTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
- Specified by:
withSplitTextMode
in interfaceorg.refcodes.textual.SplitTextModeAccessor.SplitTextModeBuilder<T>
-
withHeaderSplitTextMode
public org.refcodes.textual.ColumnSetupMetrics withHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
withHeaderSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderSplitTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withRowSplitTextMode
public org.refcodes.textual.ColumnSetupMetrics withRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
withRowSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowSplitTextMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withHeaderTextFormatMode
public org.refcodes.textual.ColumnSetupMetrics withHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
withHeaderTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderTextFormatMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withRowTextFormatMode
public org.refcodes.textual.ColumnSetupMetrics withRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
withRowTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowTextFormatMode
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withEscapeCodeFactory
public org.refcodes.textual.ColumnSetupMetrics withEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
withEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
setHeaderEscapeCodeFactory
public void setHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
setHeaderEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
withHeaderEscapeCodeFactory
public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
withHeaderEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withHeaderEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
withRowEscapeCodeFactory
public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
withRowEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
withRowEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
getHeaderEscapeCodeFactory
public org.refcodes.textual.EscapeCodeFactory getHeaderEscapeCodeFactory()
- Specified by:
getHeaderEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
fromColumnSetupMetrics
public void fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
- Specified by:
fromColumnSetupMetrics
in interfaceorg.refcodes.textual.ColumnSetupMetrics
-
toHeaderEscapeCode
public String toHeaderEscapeCode(Object aIdentifier)
- Specified by:
toHeaderEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowEscapeCodeFactory
public void setRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
- Specified by:
setRowEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowEscapeCodeFactory
public org.refcodes.textual.EscapeCodeFactory getRowEscapeCodeFactory()
- Specified by:
getRowEscapeCodeFactory
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
toRowEscapeCode
public String toRowEscapeCode(Object aIdentifier)
- Specified by:
toRowEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setEscapeCode
public void setEscapeCode(String aEscapeCode)
- Specified by:
setEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setHeaderEscapeCode
public void setHeaderEscapeCode(String aEscapeCode)
- Specified by:
setHeaderEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getHeaderEscapeCode
public String getHeaderEscapeCode()
- Specified by:
getHeaderEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowEscapeCode
public void setRowEscapeCode(String aEscapeCode)
- Specified by:
setRowEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowEscapeCode
public String getRowEscapeCode()
- Specified by:
getRowEscapeCode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setHorizAlignTextMode
public void setHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
setHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
setHorizAlignTextMode
in interfaceorg.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeMutator
-
setHeaderHorizAlignTextMode
public void setHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
setHeaderHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getHeaderHorizAlignTextMode
public org.refcodes.textual.HorizAlignTextMode getHeaderHorizAlignTextMode()
- Specified by:
getHeaderHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowHorizAlignTextMode
public void setRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
- Specified by:
setRowHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowHorizAlignTextMode
public org.refcodes.textual.HorizAlignTextMode getRowHorizAlignTextMode()
- Specified by:
getRowHorizAlignTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setMoreTextMode
public void setMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
setMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
setMoreTextMode
in interfaceorg.refcodes.textual.MoreTextModeAccessor.MoreTextModeMutator
-
setHeaderMoreTextMode
public void setHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
setHeaderMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getHeaderMoreTextMode
public org.refcodes.textual.MoreTextMode getHeaderMoreTextMode()
- Specified by:
getHeaderMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowMoreTextMode
public void setRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
- Specified by:
setRowMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowMoreTextMode
public org.refcodes.textual.MoreTextMode getRowMoreTextMode()
- Specified by:
getRowMoreTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setTextFormatMode
public void setTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
setTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
setTextFormatMode
in interfaceorg.refcodes.textual.TextFormatModeAccessor.TextFormatModeMutator
-
setSplitTextMode
public void setSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
setSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
- Specified by:
setSplitTextMode
in interfaceorg.refcodes.textual.SplitTextModeAccessor.SplitTextModeMutator
-
setHeaderSplitTextMode
public void setHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
setHeaderSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getHeaderSplitTextMode
public org.refcodes.textual.SplitTextMode getHeaderSplitTextMode()
- Specified by:
getHeaderSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowSplitTextMode
public void setRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
- Specified by:
setRowSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowSplitTextMode
public org.refcodes.textual.SplitTextMode getRowSplitTextMode()
- Specified by:
getRowSplitTextMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setHeaderTextFormatMode
public void setHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
setHeaderTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getHeaderTextFormatMode
public org.refcodes.textual.TextFormatMode getHeaderTextFormatMode()
- Specified by:
getHeaderTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
setRowTextFormatMode
public void setRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
- Specified by:
setRowTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getRowTextFormatMode
public org.refcodes.textual.TextFormatMode getRowTextFormatMode()
- Specified by:
getRowTextFormatMode
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
fromColumnFormatMetrics
public void fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics)
- Specified by:
fromColumnFormatMetrics
in interfaceorg.refcodes.textual.ColumnFormatMetrics
-
getType
public Class<T> getType()
- Specified by:
getType
in interfaceorg.refcodes.mixin.TypeAccessor<T>
-
toStorageString
public String toStorageString(T aValue)
AColumn
implementation can provide its own text exchange format for the given objects. This method enables theColumn
to convert a value of the given type to aString
and viaColumn.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 storageString
representation of the elements in that array are represented by a single returnedString
. Question: Why does the detour through the methodColumn.toStorageString(Object)
not function?!? Having this snippet in the code seems to be fine for the compiler ... tryingColumn.toStorageString_(Object)
instead :-( 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 methodColumn.toStorageStrings(Object)
may be used instead.- Specified by:
toStorageString
in interfaceColumn<T>
- Parameters:
aValue
- the element to be converted to aString
.- Returns:
- The
String
representation of the value.
-
toStorageStrings
public String[] toStorageStrings(T aValue)
AColumn
implementation can provide its own text exchange format for the given objects. This method enables theColumn
to convert a value of the given type to aString
array and viaColumn.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 storageString
representations of the elements in that array may be placed in dedicated entries of the returnedString
array. In case T is not an array type then the returnedString
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 methodColumn.toStorageString(Object)
may be used instead.- Specified by:
toStorageStrings
in interfaceColumn<T>
- Parameters:
aValue
- the element to be converted to aString
array.- Returns:
- The
String
array representation of the value.
-
fromStorageString
public T fromStorageString(String aStringValue) throws ParseException
AColumn
implementation can provide its own text exchange format for the given objects. This method enables theColumn
to convert aString
value to a value of the given type and viaColumn.toStorageString(Object)
back to theString
(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 storageString
representation of the elements in that array are represented by the single passedString
. 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 methodColumn.fromStorageStrings(String[])
may be used instead.- Specified by:
fromStorageString
in interfaceColumn<T>
- Parameters:
aStringValue
- The value to be converted to a type instance.- Returns:
- The type representation of the value.
- Throws:
ParseException
- in case parsing theString
was not possible
-
fromStorageStrings
public T fromStorageStrings(String[] aStringArray) throws ParseException
AColumn
implementation can provide its own text exchange format for the given objects. This method enables theColumn
to convert aString
array value to a value of the given type and viaColumn.toStorageStrings(Object)
back to theString
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 storageString
representations of the elements in that array may be placed in dedicated entries of the providedString
array. In case T is not an array type then the passedString
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 methodColumn.fromStorageString(String)
may be used instead.- Specified by:
fromStorageStrings
in interfaceColumn<T>
- Parameters:
aStringArray
- The value to be converted to a type instance.- Returns:
- The type representation of the value.
- Throws:
ParseException
- in case parsing theString
was not possible
-
toPrintable
public String toPrintable(T aValue)
AColumn
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 theColumn
to convert a value of the given type to a human readable text. The human readable text, in comparison to the methodObject.toString()
(orColumn.toStorageString(Object)
) is not intended to be converted back to the actual value (not bijective). This method may be used aHeader
instance's methodHeaderRow.toPrintable(Record)
.- Specified by:
toPrintable
in interfaceColumn<T>
- Parameters:
aValue
- the element to be converted to a human readable text.- Returns:
- The human readable representation of the value.
-
contains
public boolean contains(Record<?> aRecord)
Tests whether theRecord
contains a value identified by theColumn
instance's key and where the value's type is assignable to theColumn
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 theColumn
instance's type.- Specified by:
contains
in interfaceColumn<T>
- Parameters:
aRecord
- TheRecord
which to test if there is a value associated to theColumn
instance's key and if it can be casted to theColumn
instance's type.- Returns:
- True in case the
Record
contains a value identified by theColumn
instance's key and where the value's type is assignable to theColumn
instance's type.
-
get
public T get(Record<?> aRecord) throws ColumnMismatchException
Retrieves a type correct value from theRecord
identified by theColumn
instance's key. In case the type of theColumn
instance does not match the value's type associated with theColumn
instance's key, then aColumnMismatchException
is thrown.- Specified by:
get
in interfaceColumn<T>
- Parameters:
aRecord
- TheRecord
from which to retrieve the value associated to theColumn
instances key.- Returns:
- The value from the
Record
associated to theColumn
instances key. - Throws:
ColumnMismatchException
- in case the value in theRecord
associated with theColumn
instance's key does not fit theColumn
instance's type.
-
remove
public T remove(Record<?> aRecord) throws ColumnMismatchException
Removes an entry (key and value pair) from the providedRecord
matching the key and the type of theColumn
.- Specified by:
remove
in interfaceColumn<T>
- Parameters:
aRecord
- TheRecord
from which to remove the related entry.- Returns:
- The value related to the given
Column
instance's key or null if there was none such value found. - Throws:
ColumnMismatchException
- in case the value in theRecord
associated with theColumn
instance's key does not fit theColumn
instance's type.
-
-