Class ObjectColumn<T>
java.lang.Object
org.refcodes.tabular.AbstractColumn<T>
org.refcodes.tabular.ObjectColumn<T>
- Type Parameters:
T- The type managed by theColumn.
- All Implemented Interfaces:
Cloneable, KeyAccessor<String>, TypeAccessor<T>, Column<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface KeyAccessor
KeyAccessor.KeyBuilder<K,B>, KeyAccessor.KeyMutator<K>, KeyAccessor.KeyProperty<K> Nested classes/interfaces inherited from interface TypeAccessor
TypeAccessor.TypeBuilder<T,B>, TypeAccessor.TypeMutator<T>, TypeAccessor.TypeProperty<T> -
Constructor Summary
ConstructorsConstructorDescriptionObjectColumn(String aKey, Class<T> aType) Instantiates the classObjectColumn. -
Method Summary
Modifier and TypeMethodDescriptionclone()fromStorageStrings(String[] aStringValues) From storage strings.String[]toStorageStrings(T aValue) AColumnimplementation can provide its own text exchange format for the given objects.Methods inherited from class AbstractColumn
contains, fromStorageString, get, getKey, getType, remove, toPrintable, toStorageStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Column
getValue, toStorageString_
-
Constructor Details
-
ObjectColumn
-
-
Method Details
-
toStorageStrings
AColumnimplementation can provide its own text exchange format for the given objects. This method enables theColumnto convert a value of the given type to aStringarray 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 storageStringrepresentations of the elements in that array may be placed in dedicated entries of the returnedStringarray. In case T is not an array type then the returnedStringarray 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. -
fromStorageStrings
From storage strings.- Parameters:
aStringValues- the string values- Returns:
- the t
- Throws:
ParseException- the parse exception
-
clone
- Overrides:
clonein classAbstractColumn<T>- Throws:
CloneNotSupportedException
-