Package org.refcodes.tabular
Class IntegerColumn
- java.lang.Object
-
- org.refcodes.tabular.AbstractColumn<java.lang.Integer>
-
- org.refcodes.tabular.IntegerColumn
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.refcodes.mixin.KeyAccessor<java.lang.Integer>
,org.refcodes.mixin.TypeAccessor<java.lang.Integer>
,Column<java.lang.Integer>
public class IntegerColumn extends AbstractColumn<java.lang.Integer> implements java.lang.Cloneable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends java.lang.Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends java.lang.Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description IntegerColumn(java.lang.String aKey)
Creates aIntegerColumn
managingInteger
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
java.lang.Integer
fromStorageStrings(java.lang.String[] aStringValues)
AColumn
implementation can provide its own text exchange format for the given objects.java.lang.String[]
toStorageStrings(java.lang.Integer aValue)
AColumn
implementation can provide its own text exchange format for the given objects.-
Methods inherited from class org.refcodes.tabular.AbstractColumn
contains, fromStorageString, get, getKey, getType, remove, toPrintable, toStorageString
-
Methods inherited from interface org.refcodes.tabular.Column
getValue, getValue_, toStorageString_
-
-
-
-
Constructor Detail
-
IntegerColumn
public IntegerColumn(java.lang.String aKey)
Creates aIntegerColumn
managingInteger
instances.- Parameters:
aKey
- The key for theIntegerColumn
.
-
-
Method Detail
-
toStorageStrings
public java.lang.String[] toStorageStrings(java.lang.Integer 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<java.lang.Integer>
- Parameters:
aValue
- the element to be converted to aString
array.- Returns:
- The
String
array representation of the value.
-
fromStorageStrings
public java.lang.Integer fromStorageStrings(java.lang.String[] aStringValues) throws java.text.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<java.lang.Integer>
- Parameters:
aStringValues
- The value to be converted to a type instance.- Returns:
- The type representation of the value.
- Throws:
java.text.ParseException
- in case parsing theString
was not possible
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classAbstractColumn<java.lang.Integer>
- Throws:
java.lang.CloneNotSupportedException
-
-