Class StringConverter.CodeList<T extends org.opengis.util.CodeList<T>>
java.lang.Object
org.apache.sis.internal.converter.ClassPair<String,T>
org.apache.sis.internal.converter.SystemConverter<String,T>
org.apache.sis.internal.converter.StringConverter<T>
org.apache.sis.internal.converter.StringConverter.CodeList<T>
- All Implemented Interfaces:
Serializable
,Function<String,
,T> ObjectConverter<String,
T>
- Enclosing class:
StringConverter<T>
static final class StringConverter.CodeList<T extends org.opengis.util.CodeList<T>>
extends StringConverter<T>
Converter from
String
to CodeList
.
This converter is particular in that it requires the target class in argument
to the constructor.
Instances of this class are created by
SystemRegistry.createConverter(Class, Class)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.converter.StringConverter
StringConverter.Angle, StringConverter.BigDecimal, StringConverter.BigInteger, StringConverter.Boolean, StringConverter.Byte, StringConverter.Charset, StringConverter.CodeList<T extends org.opengis.util.CodeList<T>>, StringConverter.Double, StringConverter.Enum<T extends Enum<T>>, StringConverter.File, StringConverter.Float, StringConverter.Integer, StringConverter.InternationalString, StringConverter.Locale, StringConverter.Long, StringConverter.Number, StringConverter.Path, StringConverter.Short, StringConverter.Unit, StringConverter.URI, StringConverter.URL
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility on serialization.Fields inherited from class org.apache.sis.internal.converter.ClassPair
sourceClass, targetClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ObjectConverter
<T, String> Invoked by the constructor for creating the inverse converter.(package private) T
Converts the given string to the target type of this converter.Methods inherited from class org.apache.sis.internal.converter.StringConverter
apply, inverse, properties
Methods inherited from class org.apache.sis.internal.converter.SystemConverter
bijective, equals, formatErrorMessage, getSourceClass, getTargetClass, readResolve, unique
Methods inherited from class org.apache.sis.internal.converter.ClassPair
cast, hashCode, parentSource, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility on serialization.- See Also:
-
-
Constructor Details
-
CodeList
Creates a new converter for the given code list.
-
-
Method Details
-
doConvert
Converts the given string to the target type of this converter.- Specified by:
doConvert
in classStringConverter<T extends org.opengis.util.CodeList<T>>
- Parameters:
source
- the string to convert, guaranteed to be non-null and non-empty.- Returns:
- the converted value.
-
createInverse
ObjectConverter<T,String> createInverse()Invoked by the constructor for creating the inverse converter.- Overrides:
createInverse
in classStringConverter<T extends org.opengis.util.CodeList<T>>
-