public class LocaleConverter extends Object implements TypeAwareAdapter<Locale,String>
Modifier and Type | Field and Description |
---|---|
private AdapterKey |
key |
Constructor and Description |
---|
LocaleConverter() |
Modifier and Type | Method and Description |
---|---|
String |
from(Locale instance)
Take the POJO_TYPE object A from a POJO an convert it to JSON_TYPE which will be inserted into the JSON output.
|
Type |
getFrom() |
AdapterKey |
getKey() |
Type |
getTo() |
Locale |
to(String locale)
Transfer JSONTYPE_TYPE from JSON to POJO as POJO_TYPE.
|
private final AdapterKey key
public Type getTo()
getTo
in interface TypeAwareAdapter<Locale,String>
public Type getFrom()
getFrom
in interface TypeAwareAdapter<Locale,String>
public AdapterKey getKey()
getKey
in interface TypeAwareAdapter<Locale,String>
public String from(Locale instance)
Adapter
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.