public interface Converter<T>
Converter
provides a strategy to convert a value of a certain type from
plain text to a Java object and vice versa.Modifier and Type | Method and Description |
---|---|
String |
format(T value)
Converts a value of the type returned by
getValueType() to its
plain text representation. |
Class<? extends T> |
getValueType()
Gets the value type.
|
T |
parse(String text)
Converts a value from its plain text representation to a Java object instance
of the type returned by
getValueType() . |
T parse(String text) throws ConversionException
getValueType()
.text
- The textual representation of the value.ConversionException
- If the conversion fails.String format(T value)
getValueType()
to its
plain text representation.value
- The value to be converted to text.Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.