Package org.joda.convert
Enum JDKStringConverter
- All Implemented Interfaces:
Serializable,Comparable<JDKStringConverter>,java.lang.constant.Constable,FromStringConverter<Object>,StringConverter<Object>,ToStringConverter<Object>,TypedFromStringConverter<Object>,TypedStringConverter<Object>
Conversion between JDK classes and a
String.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAtomicBoolean converter.AtomicLong converter.AtomicLong converter.BigDecimal converter.BigInteger converter.Boolean converter.Byte converter.String converter.Calendar converter.String converter.CharSequence converter.Character converter.Class converter.Currency converter.Date converter.Double converter.File converter.Float converter.InetAddress converter.Integer converter.Locale converter.Long converter.Package converter.Short converter.String converter.StringBuffer converter.StringBuilder converter.TimeZone converter.URI converter.URL converter.UUID converter. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToString(Object object) Converts the specified object to aString.Class<?> Gets the type of the converter.(package private) Class<?> getType()Gets the type of the converter.private static byte[]parseBase64Binary(String str) private static StringprintBase64Binary(byte[] array) static JDKStringConverterReturns the enum constant of this type with the specified name.static JDKStringConverter[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.joda.convert.FromStringConverter
convertFromString
-
Enum Constant Details
-
STRING
String converter. -
CHAR_SEQUENCE
CharSequence converter. -
STRING_BUFFER
StringBuffer converter. -
STRING_BUILDER
StringBuilder converter. -
LONG
Long converter. -
INTEGER
Integer converter. -
SHORT
Short converter. -
BYTE
Byte converter. -
BYTE_ARRAY
String converter. -
CHARACTER
Character converter. -
CHAR_ARRAY
String converter. -
BOOLEAN
Boolean converter. -
DOUBLE
Double converter. -
FLOAT
Float converter. -
BIG_INTEGER
BigInteger converter. -
BIG_DECIMAL
BigDecimal converter. -
ATOMIC_LONG
AtomicLong converter. -
ATOMIC_INTEGER
AtomicLong converter. -
ATOMIC_BOOLEAN
AtomicBoolean converter. -
LOCALE
Locale converter. -
CLASS
Class converter. -
PACKAGE
Package converter. -
CURRENCY
Currency converter. -
TIME_ZONE
TimeZone converter. -
UUID
UUID converter. -
URL
URL converter. -
URI
URI converter. -
INET_ADDRESS
InetAddress converter. -
FILE
File converter. -
DATE
Date converter. -
CALENDAR
Calendar converter.
-
-
Field Details
-
type
The type. -
base64Str
-
base64Array
private static char[] base64Array -
MASK_8BIT
private static final int MASK_8BIT- See Also:
-
MASK_6BIT
private static final int MASK_6BIT- See Also:
-
-
Constructor Details
-
JDKStringConverter
Creates an enum.- Parameters:
type- the type, not null
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getType
Class<?> getType()Gets the type of the converter.- Returns:
- the type, not null
-
getEffectiveType
Gets the type of the converter.- Specified by:
getEffectiveTypein interfaceTypedFromStringConverter<Object>- Specified by:
getEffectiveTypein interfaceTypedStringConverter<Object>- Returns:
- the type, not null
-
convertToString
Description copied from interface:ToStringConverterConverts the specified object to aString.- Specified by:
convertToStringin interfaceToStringConverter<Object>- Parameters:
object- the object to convert, not null- Returns:
- the converted string, may be null but generally not
-
printBase64Binary
-
parseBase64Binary
-