Package org.apache.sis.referencing.crs
Class ConversionKeys
java.lang.Object
org.apache.sis.referencing.crs.ConversionKeys
Provides a map without the
"conversion."
prefix in front of property keys.
The method to invoke is unprefix(Map)
.- Since:
- 0.6
- Version:
- 0.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
true
if this converter adds the prefix, orfalse
if it removes it.private static final ConversionKeys
The converter for adding or removing thePREFIX
in keys.private static final String
The prefix to add or remove to the keys.private static final ConversionKeys
The converter for adding or removing thePREFIX
in keys. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ConversionKeys
(boolean add) Creates a new converter which will add or remove the prefix. -
Method Summary
Modifier and TypeMethodDescriptionAdds or removes the prefix from the specified key.Returns the type of keys in the user supplied properties map.Returns the type of keys in the derived properties.inverse()
Returns the inverse of this converter.Returns the manner in which source keys are mapped to target keys.Provides a map without the"conversion."
prefix in the keys.
-
Field Details
-
Constructor Details
-
ConversionKeys
private ConversionKeys(boolean add) Creates a new converter which will add or remove the prefix.
-
-
Method Details
-
unprefix
Provides a map without the"conversion."
prefix in the keys.- Type Parameters:
V
- type of values in the map.- Parameters:
properties
- the user supplied properties.
-
getSourceClass
Returns the type of keys in the user supplied properties map.- Specified by:
getSourceClass
in interfaceObjectConverter<String,
String> - Returns:
- the type of objects to convert.
-
getTargetClass
Returns the type of keys in the derived properties.- Specified by:
getTargetClass
in interfaceObjectConverter<String,
String> - Returns:
- the type of converted objects.
-
properties
Returns the manner in which source keys are mapped to target keys.- Specified by:
properties
in interfaceObjectConverter<String,
String> - Returns:
- the manners in which source values are mapped to target values. May be an empty set, but never null.
-
apply
Adds or removes the prefix from the specified key. In the removal case if the key does not begin with the prefix, then this method returnsnull
. -
inverse
Returns the inverse of this converter.- Specified by:
inverse
in interfaceObjectConverter<String,
String> - Returns:
- a converter for converting instances of T back to instances of S.
- See Also:
-