public class ExceptionColumnImpl extends AbstractColumn<Throwable> implements Cloneable
KeyAccessor.KeyBuilder<K,B extends KeyAccessor.KeyBuilder<K,B>>, KeyAccessor.KeyMutator<K>, KeyAccessor.KeyProperty<K>
TypeAccessor.TypeMutator, TypeAccessor.TypeProperty
Constructor and Description |
---|
ExceptionColumnImpl(String aKey)
Creates an
ExceptionColumnImpl which will consider the stack
trace in its string representation #toStorageString(Throwable) . |
ExceptionColumnImpl(String aKey,
PrintStackTrace aPrintStackTrace)
Creates an
ExceptionColumnImpl which can consider or omit the
stack trace in its string representation
#toStorageString(Throwable) . |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
Throwable |
fromStorageStrings(String[] aStringValues)
A
Column implementation can provide its own text exchange format
for the given objects. |
String |
toPrintable(Throwable 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). |
String[] |
toStorageStrings(Throwable aValue)
A
Column implementation can provide its own text exchange format
for the given objects. |
contains, fromStorageString, get, getKey, getType, remove, toStorageString
public ExceptionColumnImpl(String aKey)
ExceptionColumnImpl
which will consider the stack
trace in its string representation #toStorageString(Throwable)
.aKey
- The key for the ExceptionColumnImpl
.public ExceptionColumnImpl(String aKey, PrintStackTrace aPrintStackTrace)
ExceptionColumnImpl
which can consider or omit the
stack trace in its string representation
#toStorageString(Throwable)
.hasStackTrace
- When true then the stack trace in its string
representation #toStorageString(Throwable)
is considered.aKey
- The key for the ExceptionColumnImpl
.public String[] toStorageStrings(Throwable aValue)
Column
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.toStorageStrings
in interface Column<Throwable>
aValue
- the element to be converted to a String
array.String
array representation of the value.public Throwable fromStorageStrings(String[] aStringValues) throws ParseException
Column
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
#fromStorageString(Object)
may be used instead.fromStorageStrings
in interface Column<Throwable>
aStringValues
- The value to be converted to a type instance.ParseException
- in case parsing the String
was not
possiblepublic String toPrintable(Throwable aValue)
Column
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 #toString()
(or
#toStorageFormat(Object)
) is not intended to be converted back to
the actual value (not bijective).
This method may be used a Header
instance's method
Header.toPrintable(Record)
.toPrintable
in interface Column<Throwable>
toPrintable
in class AbstractColumn<Throwable>
aValue
- the element to be converted to a human readable text.public Object clone() throws CloneNotSupportedException
clone
in class AbstractColumn<Throwable>
CloneNotSupportedException
Copyright © 2016. All rights reserved.