Class FormattedColumn<T>

java.lang.Object
org.refcodes.textual.ColumnWidthMetrics
org.refcodes.textual.ColumnFormatMetrics
org.refcodes.textual.ColumnSetupMetrics
org.refcodes.tabular.FormattedColumn<T>
Type Parameters:
T - The type managed by the FormattedColumn.
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>, 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

public class FormattedColumn<T> extends org.refcodes.textual.ColumnSetupMetrics implements Column<T>
The FormattedColumn class enriches a Column with rendering metrics (as of the ColumnSetupMetrics) mostly for text-based output such as for generating output for a terminal / console.
  • 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,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K>, org.refcodes.mixin.KeyAccessor.KeyProperty<K>

    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,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>

    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
    FormattedColumn(String aKey, Class<T> aType)
    Instantiates a new formatted column decorator.
     
    FormattedColumn(String aKey, Class<T> aType, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
    Wrapper for the provided ColumnSetupMetrics decorating it with additional Column functionality.
     
    Wrapper for the provided Column decorating it with additional ColumnSetupMetrics functionality.
     
    FormattedColumn(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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(Record<?> aRecord)
    Tests whether the 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.
    void
    fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics)
    void
    fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
    void
    fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics)
    fromStorageString(String aStringValue)
    A Column implementation can provide its own text exchange format for the given objects.
    fromStorageStrings(String[] aStringArray)
    A Column implementation can provide its own text exchange format for the given objects.
    get(Record<?> aRecord)
    Retrieves a type correct value from the Record identified by the Column instance's key.
    int
    org.refcodes.textual.ColumnWidthType
    org.refcodes.textual.EscapeCodeFactory
    org.refcodes.textual.HorizAlignTextMode
    org.refcodes.textual.MoreTextMode
    org.refcodes.textual.SplitTextMode
    org.refcodes.textual.TextFormatMode
    org.refcodes.textual.EscapeCodeFactory
    org.refcodes.textual.HorizAlignTextMode
    org.refcodes.textual.MoreTextMode
    org.refcodes.textual.SplitTextMode
    org.refcodes.textual.TextFormatMode
    void
    boolean
    remove(Record<?> aRecord)
    Removes an entry (key and value pair) from the provided Record matching the key and the type of the Column.
    void
    setColumnWidth(int aColumnWidth)
    void
    setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
    void
    setEscapeCode(String aEscapeCode)
    void
    setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
    void
    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
    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 https://www.metacodes.proized cases even enriched with ANSI escape codes).
    toRowEscapeCode(Object aIdentifier)
    A Column implementation can provide its own text exchange format for the given objects.
    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
    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
    org.refcodes.textual.ColumnSetupMetrics
    withHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
    org.refcodes.textual.ColumnSetupMetrics
    withMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
    org.refcodes.textual.ColumnSetupMetrics
    org.refcodes.textual.ColumnSetupMetrics
    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
    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 org.refcodes.textual.ColumnWidthMetrics

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.tabular.Column

    getValue, toStorageString_

    Methods inherited from interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty

    letColumnWidth

    Methods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty

    letName

    Methods inherited from interface org.refcodes.graphical.VisibleAccessor.VisibleProperty

    letVisible
  • Constructor Details

    • FormattedColumn

      protected FormattedColumn(String aKey, Class<T> aType)
      Instantiates a new formatted column decorator.
      Parameters:
      aKey - the key
      aType - the type
    • FormattedColumn

      public FormattedColumn(Column<T> aColumn)
      Wrapper for the provided Column decorating it with additional ColumnSetupMetrics functionality.
      Parameters:
      aColumn - The Column to be decorated.
    • FormattedColumn

      public FormattedColumn(String aKey, Class<T> aType, org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
      Wrapper for the provided ColumnSetupMetrics decorating it with additional Column functionality.
      Parameters:
      aKey - The key for the Column.
      aType - The type to be used.
      aColumnSetupMetrics - The ColumnSetupMetrics to be decorated.
    • FormattedColumn

      public FormattedColumn(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.
      Parameters:
      aColumn - The Column to be decorated.
      aColumnSetupMetrics - The ColumnSetupMetrics to be decorated.
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.refcodes.mixin.NameAccessor
      Overrides:
      getName in class org.refcodes.textual.ColumnSetupMetrics
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface org.refcodes.graphical.VisibleAccessor
      Overrides:
      isVisible in class org.refcodes.textual.ColumnSetupMetrics
    • getColumnWidth

      public int getColumnWidth()
      Specified by:
      getColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor
      Overrides:
      getColumnWidth in class org.refcodes.textual.ColumnWidthMetrics
    • withVisible

      public org.refcodes.textual.ColumnSetupMetrics withVisible(boolean isVisible)
      Specified by:
      withVisible in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
      Overrides:
      withVisible in class org.refcodes.textual.ColumnSetupMetrics
    • setName

      public void setName(String aName)
      Specified by:
      setName in interface org.refcodes.mixin.NameAccessor.NameMutator
      Overrides:
      setName in class org.refcodes.textual.ColumnSetupMetrics
    • setVisible

      public void setVisible(boolean isVisible)
      Specified by:
      setVisible in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
      Overrides:
      setVisible in class org.refcodes.textual.ColumnSetupMetrics
    • setColumnWidth

      public void setColumnWidth(int aColumnWidth)
      Specified by:
      setColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
      Overrides:
      setColumnWidth in class org.refcodes.textual.ColumnWidthMetrics
    • withName

      public org.refcodes.textual.ColumnSetupMetrics withName(String aName)
      Specified by:
      withName in interface org.refcodes.mixin.NameAccessor.NameBuilder<T>
      Overrides:
      withName in class org.refcodes.textual.ColumnSetupMetrics
    • withColumnWidth

      public org.refcodes.textual.ColumnSetupMetrics withColumnWidth(int aColumnWidth)
      Specified by:
      withColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<T>
      Overrides:
      withColumnWidth in class org.refcodes.textual.ColumnSetupMetrics
    • show

      public void show()
      Specified by:
      show in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
    • withShow

      public org.refcodes.textual.ColumnSetupMetrics withShow()
      Specified by:
      withShow in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
      Overrides:
      withShow in class org.refcodes.textual.ColumnSetupMetrics
    • getColumnWidthType

      public org.refcodes.textual.ColumnWidthType getColumnWidthType()
      Overrides:
      getColumnWidthType in class org.refcodes.textual.ColumnWidthMetrics
    • hide

      public void hide()
      Specified by:
      hide in interface org.refcodes.graphical.VisibleAccessor.VisibleMutator
    • withHide

      public org.refcodes.textual.ColumnSetupMetrics withHide()
      Specified by:
      withHide in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
      Overrides:
      withHide in class org.refcodes.textual.ColumnSetupMetrics
    • withEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withEscapeCode(String aEscapeCode)
      Overrides:
      withEscapeCode in class org.refcodes.textual.ColumnSetupMetrics
    • setColumnWidthType

      public void setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
      Overrides:
      setColumnWidthType in class org.refcodes.textual.ColumnWidthMetrics
    • withHeaderEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCode(String aEscapeCode)
      Overrides:
      withHeaderEscapeCode in class org.refcodes.textual.ColumnSetupMetrics
    • fromColumnWidthMetrics

      public void fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics)
      Overrides:
      fromColumnWidthMetrics in class org.refcodes.textual.ColumnWidthMetrics
    • withRowEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCode(String aEscapeCode)
      Overrides:
      withRowEscapeCode in class org.refcodes.textual.ColumnSetupMetrics
    • withColumnWidthType

      public org.refcodes.textual.ColumnSetupMetrics withColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
      Overrides:
      withColumnWidthType in class org.refcodes.textual.ColumnSetupMetrics
    • withHorizAlignTextMode

      public org.refcodes.textual.ColumnSetupMetrics withHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      withHorizAlignTextMode in interface org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeBuilder<T>
      Overrides:
      withHorizAlignTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withHeaderHorizAlignTextMode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Overrides:
      withHeaderHorizAlignTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withRowHorizAlignTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Overrides:
      withRowHorizAlignTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withMoreTextMode

      public org.refcodes.textual.ColumnSetupMetrics withMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      withMoreTextMode in interface org.refcodes.textual.MoreTextModeAccessor.MoreTextModeBuilder<T>
      Overrides:
      withMoreTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withHeaderMoreTextMode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Overrides:
      withHeaderMoreTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • setEscapeCodeFactory

      public void setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      setEscapeCodeFactory in class org.refcodes.textual.ColumnFormatMetrics
    • withRowMoreTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Overrides:
      withRowMoreTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withTextFormatMode

      public org.refcodes.textual.ColumnSetupMetrics withTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      withTextFormatMode in interface org.refcodes.textual.TextFormatModeAccessor.TextFormatModeBuilder<T>
      Overrides:
      withTextFormatMode in class org.refcodes.textual.ColumnSetupMetrics
    • withSplitTextMode

      public org.refcodes.textual.ColumnSetupMetrics withSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      withSplitTextMode in interface org.refcodes.textual.SplitTextModeAccessor.SplitTextModeBuilder<T>
      Overrides:
      withSplitTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withHeaderSplitTextMode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Overrides:
      withHeaderSplitTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withRowSplitTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Overrides:
      withRowSplitTextMode in class org.refcodes.textual.ColumnSetupMetrics
    • withHeaderTextFormatMode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Overrides:
      withHeaderTextFormatMode in class org.refcodes.textual.ColumnSetupMetrics
    • withRowTextFormatMode

      public org.refcodes.textual.ColumnSetupMetrics withRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Overrides:
      withRowTextFormatMode in class org.refcodes.textual.ColumnSetupMetrics
    • withEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      withEscapeCodeFactory in class org.refcodes.textual.ColumnSetupMetrics
    • setHeaderEscapeCodeFactory

      public void setHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      setHeaderEscapeCodeFactory in class org.refcodes.textual.ColumnFormatMetrics
    • withHeaderEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      withHeaderEscapeCodeFactory in class org.refcodes.textual.ColumnSetupMetrics
    • withRowEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      withRowEscapeCodeFactory in class org.refcodes.textual.ColumnSetupMetrics
    • getHeaderEscapeCodeFactory

      public org.refcodes.textual.EscapeCodeFactory getHeaderEscapeCodeFactory()
      Overrides:
      getHeaderEscapeCodeFactory in class org.refcodes.textual.ColumnFormatMetrics
    • fromColumnSetupMetrics

      public void fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
      Overrides:
      fromColumnSetupMetrics in class org.refcodes.textual.ColumnSetupMetrics
    • toHeaderEscapeCode

      public String toHeaderEscapeCode(Object aIdentifier)
      Overrides:
      toHeaderEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowEscapeCodeFactory

      public void setRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Overrides:
      setRowEscapeCodeFactory in class org.refcodes.textual.ColumnFormatMetrics
    • getRowEscapeCodeFactory

      public org.refcodes.textual.EscapeCodeFactory getRowEscapeCodeFactory()
      Overrides:
      getRowEscapeCodeFactory in class org.refcodes.textual.ColumnFormatMetrics
    • toRowEscapeCode

      public String toRowEscapeCode(Object aIdentifier)
      Overrides:
      toRowEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • setEscapeCode

      public void setEscapeCode(String aEscapeCode)
      Overrides:
      setEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • setHeaderEscapeCode

      public void setHeaderEscapeCode(String aEscapeCode)
      Overrides:
      setHeaderEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • getHeaderEscapeCode

      public String getHeaderEscapeCode()
      Overrides:
      getHeaderEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowEscapeCode

      public void setRowEscapeCode(String aEscapeCode)
      Overrides:
      setRowEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • getRowEscapeCode

      public String getRowEscapeCode()
      Overrides:
      getRowEscapeCode in class org.refcodes.textual.ColumnFormatMetrics
    • setHorizAlignTextMode

      public void setHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      setHorizAlignTextMode in interface org.refcodes.textual.HorizAlignTextModeAccessor.HorizAlignTextModeMutator
      Overrides:
      setHorizAlignTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setHeaderHorizAlignTextMode

      public void setHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Overrides:
      setHeaderHorizAlignTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getHeaderHorizAlignTextMode

      public org.refcodes.textual.HorizAlignTextMode getHeaderHorizAlignTextMode()
      Overrides:
      getHeaderHorizAlignTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowHorizAlignTextMode

      public void setRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Overrides:
      setRowHorizAlignTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getRowHorizAlignTextMode

      public org.refcodes.textual.HorizAlignTextMode getRowHorizAlignTextMode()
      Overrides:
      getRowHorizAlignTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setMoreTextMode

      public void setMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      setMoreTextMode in interface org.refcodes.textual.MoreTextModeAccessor.MoreTextModeMutator
      Overrides:
      setMoreTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setHeaderMoreTextMode

      public void setHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Overrides:
      setHeaderMoreTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getHeaderMoreTextMode

      public org.refcodes.textual.MoreTextMode getHeaderMoreTextMode()
      Overrides:
      getHeaderMoreTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowMoreTextMode

      public void setRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Overrides:
      setRowMoreTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getRowMoreTextMode

      public org.refcodes.textual.MoreTextMode getRowMoreTextMode()
      Overrides:
      getRowMoreTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setTextFormatMode

      public void setTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      setTextFormatMode in interface org.refcodes.textual.TextFormatModeAccessor.TextFormatModeMutator
      Overrides:
      setTextFormatMode in class org.refcodes.textual.ColumnFormatMetrics
    • setSplitTextMode

      public void setSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      setSplitTextMode in interface org.refcodes.textual.SplitTextModeAccessor.SplitTextModeMutator
      Overrides:
      setSplitTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setHeaderSplitTextMode

      public void setHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Overrides:
      setHeaderSplitTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getHeaderSplitTextMode

      public org.refcodes.textual.SplitTextMode getHeaderSplitTextMode()
      Overrides:
      getHeaderSplitTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowSplitTextMode

      public void setRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Overrides:
      setRowSplitTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • getRowSplitTextMode

      public org.refcodes.textual.SplitTextMode getRowSplitTextMode()
      Overrides:
      getRowSplitTextMode in class org.refcodes.textual.ColumnFormatMetrics
    • setHeaderTextFormatMode

      public void setHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Overrides:
      setHeaderTextFormatMode in class org.refcodes.textual.ColumnFormatMetrics
    • getHeaderTextFormatMode

      public org.refcodes.textual.TextFormatMode getHeaderTextFormatMode()
      Overrides:
      getHeaderTextFormatMode in class org.refcodes.textual.ColumnFormatMetrics
    • setRowTextFormatMode

      public void setRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Overrides:
      setRowTextFormatMode in class org.refcodes.textual.ColumnFormatMetrics
    • getRowTextFormatMode

      public org.refcodes.textual.TextFormatMode getRowTextFormatMode()
      Overrides:
      getRowTextFormatMode in class org.refcodes.textual.ColumnFormatMetrics
    • fromColumnFormatMetrics

      public void fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics)
      Overrides:
      fromColumnFormatMetrics in class org.refcodes.textual.ColumnFormatMetrics
    • getType

      public Class<T> getType()
      Specified by:
      getType in interface org.refcodes.mixin.TypeAccessor<T>
    • getKey

      public String getKey()
      Specified by:
      getKey in interface org.refcodes.mixin.KeyAccessor<T>
    • toStorageString

      public String toStorageString(T aValue)
      A 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. Question: Why does the detour through the method Column.toStorageString(Object) not function?!? Having this snippet in the code seems to be fine for the compiler ... trying Column.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 method Column.toStorageStrings(Object) may be used instead.
      Specified by:
      toStorageString in interface Column<T>
      Parameters:
      aValue - the element to be converted to a String.
      Returns:
      The String representation of the value.
    • toStorageStrings

      public String[] toStorageStrings(T aValue)
      A 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.
      Specified by:
      toStorageStrings in interface Column<T>
      Parameters:
      aValue - the element to be converted to a String array.
      Returns:
      The String array representation of the value.
    • fromStorageString

      public T fromStorageString(String aStringValue) throws ParseException
      A 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.
      Specified by:
      fromStorageString in interface Column<T>
      Parameters:
      aStringValue - The value to be converted to a type instance.
      Returns:
      The type representation of the value.
      Throws:
      ParseException - in case parsing the String was not possible
    • fromStorageStrings

      public T fromStorageStrings(String[] aStringArray) throws ParseException
      A 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.
      Specified by:
      fromStorageStrings in interface Column<T>
      Parameters:
      aStringArray - The value to be converted to a type instance.
      Returns:
      The type representation of the value.
      Throws:
      ParseException - in case parsing the String was not possible
    • toPrintable

      public 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 https://www.metacodes.proized 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 HeaderRow.toPrintable(Record).
      Specified by:
      toPrintable in interface Column<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 the 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.
      Specified by:
      contains in interface Column<T>
      Parameters:
      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.
      Returns:
      True in case the 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.
    • get

      public T get(Record<?> aRecord) throws ColumnMismatchException
      Retrieves a type correct value from the 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.
      Specified by:
      get in interface Column<T>
      Parameters:
      aRecord - The Record from which to retrieve the value associated to the Column instances key.
      Returns:
      The value from the Record associated to the Column instances key.
      Throws:
      ColumnMismatchException - in case the value in the Record associated with the Column instance's key does not fit the Column instance's type.
    • remove

      public T remove(Record<?> aRecord) throws ColumnMismatchException
      Removes an entry (key and value pair) from the provided Record matching the key and the type of the Column.
      Specified by:
      remove in interface Column<T>
      Parameters:
      aRecord - The Record 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 the Record associated with the Column instance's key does not fit the Column instance's type.