public abstract class ValueCodec extends Object
Constructor and Description |
---|
ValueCodec() |
Modifier and Type | Method and Description |
---|---|
abstract String |
formatValue(Object value,
int maxLength)
Returns a string representation of a given value in the context of
this codec.
|
static ValueCodec[] |
getCodecs(uk.ac.starlink.table.ValueInfo info)
Returns an array of ValueCodec objects suitable for representing
the values pertaining to a given
ValueInfo object. |
abstract Object |
unformatString(String text)
Decodes a string to give a value in the context of this codec.
|
public abstract Object unformatString(String text)
text
- string representation of the valuetext
public abstract String formatValue(Object value, int maxLength)
value
- value objectmaxLength
- maximum number of characters in the returned stringvalue
public static ValueCodec[] getCodecs(uk.ac.starlink.table.ValueInfo info)
ValueInfo
object.
The returned array will contain at least one element, which
just gets its implementation from the behaviour of the submitted
ValueInfo itself, but it may contain more than this, for instance
ones relating to different units.info
- description of the value to representinfo
, containing
at least one elementCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.