Modifier and Type | Field and Description |
---|---|
static Converter<Instant,Timestamp> |
INSTANT_TIMESTAMP_CONVERTER
This
Converter translates between the Instant
class and the Timestamp and is used by the built-in
support for Instant . |
static Converter<Boolean,Long> |
ONE_ZERO_BOOLEAN_LONG_CONVERTER
This
Converter translates true values to 1 and false values to 0. |
static Converter<Boolean,String> |
T_F_BOOLEAN_STRING_CONVERTER
This
Converter translates true values to "T" and false values to "F". |
Constructor and Description |
---|
Converters() |
Modifier and Type | Method and Description |
---|---|
static Converter<Boolean,Long> |
booleanConverter(Long trueValue,
Long falseValue)
Produces a converter instance for encoding boolean values as
Long values. |
static Converter<Boolean,String> |
booleanConverter(String trueValue,
String falseValue)
Produces a converter instance for encoding boolean values as
String values. |
static <T> Converter<T,T> |
identity()
Produces an empty
Converter that does no transformations. |
public static Converter<Boolean,String> T_F_BOOLEAN_STRING_CONVERTER
Converter
translates true values to "T" and false values to "F".public static Converter<Boolean,Long> ONE_ZERO_BOOLEAN_LONG_CONVERTER
Converter
translates true values to 1 and false values to 0.public static <T> Converter<T,T> identity()
Converter
that does no transformations.T
- The type supported by the Converter
Converter
interface that passes objects through
without changepublic static Converter<Boolean,String> booleanConverter(String trueValue, String falseValue)
String
values.trueValue
- Representation for the value for true.falseValue
- Representation for the value for false.public static Converter<Boolean,Long> booleanConverter(Long trueValue, Long falseValue)
Long
values.trueValue
- Representation for the value for true.falseValue
- Representation for the value for false.Copyright © 2019. All rights reserved.