public class LocaleTypeDescriptor extends AbstractTypeDescriptor<java.util.Locale>
Locale
handling.Modifier and Type | Class and Description |
---|---|
static class |
LocaleTypeDescriptor.LocaleComparator |
Modifier and Type | Field and Description |
---|---|
static LocaleTypeDescriptor |
INSTANCE |
Constructor and Description |
---|
LocaleTypeDescriptor() |
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
fromString(java.lang.String string) |
java.util.Comparator<java.util.Locale> |
getComparator()
Retrieve the natural comparator for this type.
|
java.lang.String |
toString(java.util.Locale value) |
<X> X |
unwrap(java.util.Locale value,
java.lang.Class<X> type,
WrapperOptions options)
Unwrap an instance of our handled Java type into the requested type.
|
<X> java.util.Locale |
wrap(X value,
WrapperOptions options)
Wrap a value as our handled Java type.
|
areEqual, extractHashCode, extractLoggableRepresentation, getJavaTypeClass, getMutabilityPlan, unknownUnwrap, unknownWrap
public static final LocaleTypeDescriptor INSTANCE
public java.util.Comparator<java.util.Locale> getComparator()
JavaTypeDescriptor
getComparator
in interface JavaTypeDescriptor<java.util.Locale>
getComparator
in class AbstractTypeDescriptor<java.util.Locale>
public java.lang.String toString(java.util.Locale value)
public java.util.Locale fromString(java.lang.String string)
public <X> X unwrap(java.util.Locale value, java.lang.Class<X> type, WrapperOptions options)
JavaTypeDescriptor
JavaTypeDescriptor<Integer>
and we are asked to unwrap
the Integer value
as a Long
we would return something like
Long.valueOf( value.longValue() )
.
Intended use is during PreparedStatement
binding.X
- The conversion type.value
- The value to unwraptype
- The type as which to unwrapoptions
- The optionspublic <X> java.util.Locale wrap(X value, WrapperOptions options)
JavaTypeDescriptor
ResultSet
extraction.X
- The conversion type.value
- The value to wrap.options
- The optionsCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.