Index
All Classes and Interfaces|All Packages|Serialized Form
B
- Bool - Class in org.klojang.convert
-
Converts values from various non-boolean types to boolean values.
- Bool(Set<String>, Set<String>) - Constructor for class org.klojang.convert.Bool
-
Creates a new
Bool
instance that will use the providedtrue
strings andfalse
strings to evaluateString
arguments.
C
- convert(Object) - Method in class org.klojang.convert.Morph
-
Converts the specified object into an instance of the type specified through the constructor.
- convert(Object, Class<U>) - Static method in class org.klojang.convert.Morph
-
Converts the specified object to the specified type.
- convert(T, Class<R>) - Static method in class org.klojang.convert.NumberMethods
-
Safely converts a number of an unspecified type to a number of a definite type.
D
- DEFAULT_NORMALIZER - Static variable in class org.klojang.convert.EnumParser
-
The default normalization function.
E
- EnumParser<T> - Class in org.klojang.convert
-
Parses strings into enum constants.
- EnumParser(Class<T>) - Constructor for class org.klojang.convert.EnumParser
-
Creates an
EnumParser
for the specified enum class, using theEnumParser.DEFAULT_NORMALIZER
. - EnumParser(Class<T>, UnaryOperator<String>) - Constructor for class org.klojang.convert.EnumParser
-
Creates an
EnumParser
for the specified enum class, using the specifiednormalizer
to normalize the strings to be parsed. - EnumParser(Class<T>, UnaryOperator<String>, Set<EnumParser.ParseTarget>) - Constructor for class org.klojang.convert.EnumParser
-
Creates an
EnumParser
for the specified enum class, using the specifiednormalizer
to normalize the strings to be parsed. - EnumParser.ParseTarget - Enum Class in org.klojang.convert
-
Symbolic constants for what the value to be converted represents.
F
- FALSE_STRINGS - Static variable in class org.klojang.convert.Bool
-
The default set of strings that count as
false
values (ignoring case): "false", "0", "false", "off", "disabled". - fitsInto(Number, Class<T>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified number can be converted to the specified target type without loss of information. - fitsInto(String, Class<T>) - Static method in class org.klojang.convert.NumberMethods
-
Tests whether the specified string can be parsed into a
Number
of the specified type. - from(byte) - Static method in class org.klojang.convert.Bool
-
Converts the specified
Number
to aBoolean
value. - from(char) - Static method in class org.klojang.convert.Bool
-
Converts the specified
character
to aBoolean
value. - from(double) - Static method in class org.klojang.convert.Bool
-
Converts the specified
double
to aBoolean
value. - from(float) - Static method in class org.klojang.convert.Bool
-
Converts the specified
float
to aBoolean
value. - from(int) - Static method in class org.klojang.convert.Bool
-
Converts the specified
int
to aBoolean
value. - from(long) - Static method in class org.klojang.convert.Bool
-
Converts the specified
long
to aBoolean
value. - from(short) - Static method in class org.klojang.convert.Bool
-
Converts the specified
short
to aBoolean
value. - from(Number) - Static method in class org.klojang.convert.Bool
-
Converts the specified
Number
to aBoolean
value. - from(Object) - Static method in class org.klojang.convert.Bool
-
Attempts to convert the specified object to a
Boolean
. - from(String) - Static method in class org.klojang.convert.Bool
-
Converts the specified
String
to aBoolean
value.
G
- getInputValue() - Method in exception class org.klojang.convert.TypeConversionException
-
Returns the value for which the type conversion failed.
- getTargetType() - Method in exception class org.klojang.convert.TypeConversionException
-
Returns the target type of the type conversion.
I
- IDENTITY - Enum constant in enum class org.klojang.convert.EnumParser.ParseTarget
-
Indicates that the value to be converted is supposed to be already an enum constant and must be returned as-is by the parser.
- isBigDecimal(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into aBigDecimal
. - isBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into aBigInteger
without loss of information. - isBoolean(String) - Method in class org.klojang.convert.Bool
-
Returns
true
if the specified string isnull
or one of the string that count astrue
orfalse
. - isByte(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into abyte
without loss of information. - isConvertible(String) - Static method in class org.klojang.convert.Bool
-
Returns
true
if the specified string isnull
or one of the string that count astrue
orfalse
. - isDouble(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into adouble
without loss of information. - isFloat(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into afloat
without loss of information. - isInt(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into anint
without loss of information. - isIntegral(Class<?>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified class is one ofByte
,Short
,Integer
,Long
,BigInteger
. - isIntegral(Number) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified number is an integral number. - isLong(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into along
without loss of information. - isRound(double) - Static method in class org.klojang.convert.NumberMethods
-
Determines whether the specified double's fractional part is zero or absent.
- isRound(float) - Static method in class org.klojang.convert.NumberMethods
-
Determines whether the specified float's fractional part is zero or absent.
- isRound(BigDecimal) - Static method in class org.klojang.convert.NumberMethods
-
Determines whether the specified BigDecimal's fractional part is zero or absent.
- isShort(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified string can be parsed into ashort
without loss of information. - isWrapper(Class<?>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified class is one of the standard primitive number wrappers:Byte
,Short
,Integer
,Long
,Float
,Double
. - isWrapper(Number) - Static method in class org.klojang.convert.NumberMethods
-
Returns
true
if the specified number belongs to one of the primitive number wrappers.
M
- MAX_DOUBLE_BD - Static variable in class org.klojang.convert.NumberMethods
-
Double.MAX_VALUE
converted to aBigDecimal
. - MAX_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
-
Long.MAX_VALUE
converted to aBigDecimal
. - MAX_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
-
Long.MAX_VALUE
converted to aBigInteger
. - MIN_DOUBLE_BD - Static variable in class org.klojang.convert.NumberMethods
-
Double.MIN_VALUE
converted to aBigDecimal
. - MIN_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
-
Long.MIN_VALUE
converted to aBigDecimal
. - MIN_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
-
Long.MIN_VALUE
converted to aBigInteger
. - Morph<T> - Class in org.klojang.convert
-
Performs a wide variety of type conversions.
- Morph(Class<T>) - Constructor for class org.klojang.convert.Morph
-
Creates a new
Morph
instance that will convert values to the specified type.
N
- NAME - Enum constant in enum class org.klojang.convert.EnumParser.ParseTarget
-
Indicates that the value to be converted is supposed to be the name of an enum constant.
- NumberMethods - Class in org.klojang.convert
-
Methods for parsing, inspecting and converting
Number
instances.
O
- ORDINAL - Enum constant in enum class org.klojang.convert.EnumParser.ParseTarget
-
Indicates that the value to be converted is supposed to be the ordinal value of an enum constant.
- org.klojang.convert - module org.klojang.convert
- org.klojang.convert - package org.klojang.convert
-
Central package of this module
P
- parse(Object) - Method in class org.klojang.convert.EnumParser
-
Parses the specified value into an enum constant.
- parse(String, Class<T>) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a number of the specified type.
- parseBigDecimal(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
BigInteger
. - parseBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
BigInteger
. - parseByte(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
byte
. - parseDouble(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
double
. - parseFloat(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
float
. - parseInt(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
int
. - parseLong(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
long
. - parseShort(String) - Static method in class org.klojang.convert.NumberMethods
-
Parses the specified string into a
short
.
T
- test(byte) - Method in class org.klojang.convert.Bool
-
Converts the specified
byte
to aBoolean
value. - test(char) - Method in class org.klojang.convert.Bool
-
Converts the specified
char
to aBoolean
value. - test(double) - Method in class org.klojang.convert.Bool
-
Converts the specified
double
to aBoolean
value. - test(float) - Method in class org.klojang.convert.Bool
-
Converts the specified
float
to aBoolean
value. - test(int) - Method in class org.klojang.convert.Bool
-
Converts the specified
int
to aBoolean
value. - test(long) - Method in class org.klojang.convert.Bool
-
Converts the specified
long
to aBoolean
value. - test(short) - Method in class org.klojang.convert.Bool
-
Converts the specified
short
to aBoolean
value. - test(Number) - Method in class org.klojang.convert.Bool
-
Converts the specified
Number
to aBoolean
value. - test(Object) - Method in class org.klojang.convert.Bool
-
Attempts to convert the specified object to a
Boolean
. - test(String) - Method in class org.klojang.convert.Bool
-
Converts the specified
String
to aBoolean
value. - TO_STRING - Enum constant in enum class org.klojang.convert.EnumParser.ParseTarget
-
Indicates that the value to be converted is supposed to be the string representation of an enum constant.
- toBigDecimal(Number) - Static method in class org.klojang.convert.NumberMethods
-
Converts a
Number
of an unspecified type to aBigDecimal
. - toBigDecimal(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
Optional
if the specified string cannot be parsed into BigDecimal, else anOptional
containing theBigDecimal
value parsed out of the string. - toBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
Optional
if the specified string cannot be parsed into BigInteger, else anOptional
containing theBigInteger
value parsed out of the string. - toByte(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalInt
if the specified string cannot be parsed into an 8-bit integer, else anOptionalInt
containing thebyte
value parsed out of the string. - toDouble(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalDouble
if the specified string cannot be parsed into adouble
value, else anOptionalDouble
containing thedouble
value parsed out of the string. - toFloat(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalDouble
if the specified string cannot be parsed into a regular, finitefloat
value, else anOptionalDouble
containing thefloat
value parsed out of the string. - toInt(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalInt
if the specified string cannot be parsed into a 32-bit integer, else anOptionalInt
containing theint
value parsed out of the string. - toLong(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalLong
if the specified string cannot be parsed into a 64-bit integer, else anOptionalLong
containing thelong
value parsed out of the string. - toShort(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalInt
if the specified string cannot be parsed into a 16-bit integer, else anOptionalInt
containing theshort
value parsed out of the string. - TRUE_STRINGS - Static variable in class org.klojang.convert.Bool
-
The default set of strings that count as
true
values (ignoring case): "true", "1", "yes", "on", "enabled". - TypeConversionException - Exception Class in org.klojang.convert
-
Indicates that a value could not be converted to the desired type.
- TypeConversionException(Object, Class<?>, String, Object...) - Constructor for exception class org.klojang.convert.TypeConversionException
-
Creates a new
TypeConversionException
for the specified input value and target type.
V
- valueOf(String) - Static method in enum class org.klojang.convert.EnumParser.ParseTarget
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.klojang.convert.EnumParser.ParseTarget
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages|Serialized Form