public final class LiteralStringAttributeValueMarshaller extends Object implements AttributeValueMarshaller<String>
AttributeValueMarshaller
for "literal" String
s which must not be
transliterated.
Note: using this implementation for an AttributeDefinition
where the
AttributeDefinition.isTransliterationMandatory()
is true
and the
supplied value is not in LatinScript would thow an exception in ImmutableAttributeMap.Builder.build()
.
Constructor and Description |
---|
LiteralStringAttributeValueMarshaller() |
Modifier and Type | Method and Description |
---|---|
String |
marshal(AttributeValue<String> value)
Marshals the given typed value as a
String . |
AttributeValue<String> |
unmarshal(String value,
boolean isNonLatinScriptAlternateVersion)
Unmarshals the given
String as a typed value. |
public LiteralStringAttributeValueMarshaller()
@Nonnull public String marshal(@Nonnull AttributeValue<String> value)
AttributeValueMarshaller
String
.marshal
in interface AttributeValueMarshaller<String>
value
- the typed value to marshal as a String
.String
representation of the given typed value.@Nonnull public AttributeValue<String> unmarshal(@Nonnull String value, boolean isNonLatinScriptAlternateVersion)
AttributeValueMarshaller
String
as a typed value.unmarshal
in interface AttributeValueMarshaller<String>
value
- the String
representation to unmarshal to a typed value.isNonLatinScriptAlternateVersion
- indicates whether the provided value is the non-latin script alternate
version of another attribute value.String
representation.Copyright © 2020. All Rights Reserved.