Class FormattedColumnDecorator<T>

java.lang.Object
org.refcodes.tabular.FormattedColumnDecorator<T>
Type Parameters:
T - The type managed by the Column.
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.
  • Constructor Details

    • FormattedColumnDecorator

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

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

      public FormattedColumnDecorator(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.
    • FormattedColumnDecorator

      public 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.
      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
    • isVisible

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

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

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

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

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

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

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

      public org.refcodes.textual.ColumnSetupMetrics withColumnWidth(int aColumnWidth)
      Specified by:
      withColumnWidth in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withColumnWidth in interface org.refcodes.textual.ColumnSetupMetrics
      Specified by:
      withColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<T>
    • 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.textual.ColumnSetupMetrics
      Specified by:
      withShow in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
    • getColumnWidthType

      public org.refcodes.textual.ColumnWidthType getColumnWidthType()
      Specified by:
      getColumnWidthType in interface 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.textual.ColumnSetupMetrics
      Specified by:
      withHide in interface org.refcodes.graphical.VisibleAccessor.VisibleBuilder<T>
    • withEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withEscapeCode(String aEscapeCode)
      Specified by:
      withEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withEscapeCode in interface org.refcodes.textual.ColumnSetupMetrics
    • setColumnWidthType

      public void setColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
      Specified by:
      setColumnWidthType in interface org.refcodes.textual.ColumnWidthMetrics
    • withHeaderEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCode(String aEscapeCode)
      Specified by:
      withHeaderEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderEscapeCode in interface org.refcodes.textual.ColumnSetupMetrics
    • fromColumnWidthMetrics

      public void fromColumnWidthMetrics(org.refcodes.textual.ColumnWidthMetrics aColumnWidthMetrics)
      Specified by:
      fromColumnWidthMetrics in interface org.refcodes.textual.ColumnWidthMetrics
    • withRowEscapeCode

      public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCode(String aEscapeCode)
      Specified by:
      withRowEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowEscapeCode in interface org.refcodes.textual.ColumnSetupMetrics
    • withColumnWidthType

      public org.refcodes.textual.ColumnSetupMetrics withColumnWidthType(org.refcodes.textual.ColumnWidthType aColumnWidthType)
      Specified by:
      withColumnWidthType in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withColumnWidthType in interface org.refcodes.textual.ColumnSetupMetrics
      Specified by:
      withColumnWidthType in interface org.refcodes.textual.ColumnWidthMetrics
    • withHorizAlignTextMode

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

      public org.refcodes.textual.ColumnSetupMetrics withHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      withHeaderHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderHorizAlignTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withRowHorizAlignTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      withRowHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowHorizAlignTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withMoreTextMode

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

      public org.refcodes.textual.ColumnSetupMetrics withHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      withHeaderMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderMoreTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • setEscapeCodeFactory

      public void setEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      setEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
    • withRowMoreTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      withRowMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowMoreTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withTextFormatMode

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

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

      public org.refcodes.textual.ColumnSetupMetrics withHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      withHeaderSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderSplitTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withRowSplitTextMode

      public org.refcodes.textual.ColumnSetupMetrics withRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      withRowSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowSplitTextMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withHeaderTextFormatMode

      public org.refcodes.textual.ColumnSetupMetrics withHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      withHeaderTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderTextFormatMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withRowTextFormatMode

      public org.refcodes.textual.ColumnSetupMetrics withRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      withRowTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowTextFormatMode in interface org.refcodes.textual.ColumnSetupMetrics
    • withEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      withEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withEscapeCodeFactory in interface org.refcodes.textual.ColumnSetupMetrics
    • setHeaderEscapeCodeFactory

      public void setHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      setHeaderEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
    • withHeaderEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withHeaderEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      withHeaderEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withHeaderEscapeCodeFactory in interface org.refcodes.textual.ColumnSetupMetrics
    • withRowEscapeCodeFactory

      public org.refcodes.textual.ColumnSetupMetrics withRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      withRowEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
      Specified by:
      withRowEscapeCodeFactory in interface org.refcodes.textual.ColumnSetupMetrics
    • getHeaderEscapeCodeFactory

      public org.refcodes.textual.EscapeCodeFactory getHeaderEscapeCodeFactory()
      Specified by:
      getHeaderEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
    • fromColumnSetupMetrics

      public void fromColumnSetupMetrics(org.refcodes.textual.ColumnSetupMetrics aColumnSetupMetrics)
      Specified by:
      fromColumnSetupMetrics in interface org.refcodes.textual.ColumnSetupMetrics
    • toHeaderEscapeCode

      public String toHeaderEscapeCode(Object aIdentifier)
      Specified by:
      toHeaderEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowEscapeCodeFactory

      public void setRowEscapeCodeFactory(org.refcodes.textual.EscapeCodeFactory aEscapeCodeFactory)
      Specified by:
      setRowEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowEscapeCodeFactory

      public org.refcodes.textual.EscapeCodeFactory getRowEscapeCodeFactory()
      Specified by:
      getRowEscapeCodeFactory in interface org.refcodes.textual.ColumnFormatMetrics
    • toRowEscapeCode

      public String toRowEscapeCode(Object aIdentifier)
      Specified by:
      toRowEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • setEscapeCode

      public void setEscapeCode(String aEscapeCode)
      Specified by:
      setEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • setHeaderEscapeCode

      public void setHeaderEscapeCode(String aEscapeCode)
      Specified by:
      setHeaderEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • getHeaderEscapeCode

      public String getHeaderEscapeCode()
      Specified by:
      getHeaderEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowEscapeCode

      public void setRowEscapeCode(String aEscapeCode)
      Specified by:
      setRowEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowEscapeCode

      public String getRowEscapeCode()
      Specified by:
      getRowEscapeCode in interface org.refcodes.textual.ColumnFormatMetrics
    • setHorizAlignTextMode

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

      public void setHeaderHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      setHeaderHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getHeaderHorizAlignTextMode

      public org.refcodes.textual.HorizAlignTextMode getHeaderHorizAlignTextMode()
      Specified by:
      getHeaderHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowHorizAlignTextMode

      public void setRowHorizAlignTextMode(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode)
      Specified by:
      setRowHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowHorizAlignTextMode

      public org.refcodes.textual.HorizAlignTextMode getRowHorizAlignTextMode()
      Specified by:
      getRowHorizAlignTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setMoreTextMode

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

      public void setHeaderMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      setHeaderMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getHeaderMoreTextMode

      public org.refcodes.textual.MoreTextMode getHeaderMoreTextMode()
      Specified by:
      getHeaderMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowMoreTextMode

      public void setRowMoreTextMode(org.refcodes.textual.MoreTextMode aMoreTextMode)
      Specified by:
      setRowMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowMoreTextMode

      public org.refcodes.textual.MoreTextMode getRowMoreTextMode()
      Specified by:
      getRowMoreTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setTextFormatMode

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

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

      public void setHeaderSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      setHeaderSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getHeaderSplitTextMode

      public org.refcodes.textual.SplitTextMode getHeaderSplitTextMode()
      Specified by:
      getHeaderSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowSplitTextMode

      public void setRowSplitTextMode(org.refcodes.textual.SplitTextMode aSplitTextMode)
      Specified by:
      setRowSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowSplitTextMode

      public org.refcodes.textual.SplitTextMode getRowSplitTextMode()
      Specified by:
      getRowSplitTextMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setHeaderTextFormatMode

      public void setHeaderTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      setHeaderTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getHeaderTextFormatMode

      public org.refcodes.textual.TextFormatMode getHeaderTextFormatMode()
      Specified by:
      getHeaderTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
    • setRowTextFormatMode

      public void setRowTextFormatMode(org.refcodes.textual.TextFormatMode aTextFormatMode)
      Specified by:
      setRowTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
    • getRowTextFormatMode

      public org.refcodes.textual.TextFormatMode getRowTextFormatMode()
      Specified by:
      getRowTextFormatMode in interface org.refcodes.textual.ColumnFormatMetrics
    • fromColumnFormatMetrics

      public void fromColumnFormatMetrics(org.refcodes.textual.ColumnFormatMetrics aColumnFormatMetrics)
      Specified by:
      fromColumnFormatMetrics in interface 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 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 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.