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
Boolinstance that will use the providedtruestrings andfalsestrings to evaluateStringarguments.
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
EnumParserfor the specified enum class, using theEnumParser.DEFAULT_NORMALIZER. - EnumParser(Class<T>, UnaryOperator<String>) - Constructor for class org.klojang.convert.EnumParser
-
Creates an
EnumParserfor the specified enum class, using the specifiednormalizerto normalize the strings to be parsed. - EnumParser(Class<T>, UnaryOperator<String>, Set<EnumParser.ParseTarget>) - Constructor for class org.klojang.convert.EnumParser
-
Creates an
EnumParserfor the specified enum class, using the specifiednormalizerto 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
falsevalues (ignoring case): "false", "0", "false", "off", "disabled". - fitsInto(Number, Class<T>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif 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
Numberof the specified type. - from(byte) - Static method in class org.klojang.convert.Bool
-
Converts the specified
Numberto aBooleanvalue. - from(char) - Static method in class org.klojang.convert.Bool
-
Converts the specified
characterto aBooleanvalue. - from(double) - Static method in class org.klojang.convert.Bool
-
Converts the specified
doubleto aBooleanvalue. - from(float) - Static method in class org.klojang.convert.Bool
-
Converts the specified
floatto aBooleanvalue. - from(int) - Static method in class org.klojang.convert.Bool
-
Converts the specified
intto aBooleanvalue. - from(long) - Static method in class org.klojang.convert.Bool
-
Converts the specified
longto aBooleanvalue. - from(short) - Static method in class org.klojang.convert.Bool
-
Converts the specified
shortto aBooleanvalue. - from(Number) - Static method in class org.klojang.convert.Bool
-
Converts the specified
Numberto aBooleanvalue. - 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
Stringto aBooleanvalue.
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
trueif the specified string can be parsed into aBigDecimal. - isBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into aBigIntegerwithout loss of information. - isBoolean(String) - Method in class org.klojang.convert.Bool
-
Returns
trueif the specified string isnullor one of the string that count astrueorfalse. - isByte(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into abytewithout loss of information. - isConvertible(String) - Static method in class org.klojang.convert.Bool
-
Returns
trueif the specified string isnullor one of the string that count astrueorfalse. - isDouble(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into adoublewithout loss of information. - isFloat(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into afloatwithout loss of information. - isInt(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into anintwithout loss of information. - isIntegral(Class<?>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified class is one ofByte,Short,Integer,Long,BigInteger. - isIntegral(Number) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified number is an integral number. - isLong(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif the specified string can be parsed into alongwithout 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
trueif the specified string can be parsed into ashortwithout loss of information. - isWrapper(Class<?>) - Static method in class org.klojang.convert.NumberMethods
-
Returns
trueif 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
trueif 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_VALUEconverted to aBigDecimal. - MAX_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
-
Long.MAX_VALUEconverted to aBigDecimal. - MAX_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
-
Long.MAX_VALUEconverted to aBigInteger. - MIN_DOUBLE_BD - Static variable in class org.klojang.convert.NumberMethods
-
Double.MIN_VALUEconverted to aBigDecimal. - MIN_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
-
Long.MIN_VALUEconverted to aBigDecimal. - MIN_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
-
Long.MIN_VALUEconverted 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
Morphinstance 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
Numberinstances.
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
byteto aBooleanvalue. - test(char) - Method in class org.klojang.convert.Bool
-
Converts the specified
charto aBooleanvalue. - test(double) - Method in class org.klojang.convert.Bool
-
Converts the specified
doubleto aBooleanvalue. - test(float) - Method in class org.klojang.convert.Bool
-
Converts the specified
floatto aBooleanvalue. - test(int) - Method in class org.klojang.convert.Bool
-
Converts the specified
intto aBooleanvalue. - test(long) - Method in class org.klojang.convert.Bool
-
Converts the specified
longto aBooleanvalue. - test(short) - Method in class org.klojang.convert.Bool
-
Converts the specified
shortto aBooleanvalue. - test(Number) - Method in class org.klojang.convert.Bool
-
Converts the specified
Numberto aBooleanvalue. - 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
Stringto aBooleanvalue. - 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
Numberof an unspecified type to aBigDecimal. - toBigDecimal(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
Optionalif the specified string cannot be parsed into BigDecimal, else anOptionalcontaining theBigDecimalvalue parsed out of the string. - toBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
Optionalif the specified string cannot be parsed into BigInteger, else anOptionalcontaining theBigIntegervalue parsed out of the string. - toByte(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalIntif the specified string cannot be parsed into an 8-bit integer, else anOptionalIntcontaining thebytevalue parsed out of the string. - toDouble(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalDoubleif the specified string cannot be parsed into adoublevalue, else anOptionalDoublecontaining thedoublevalue parsed out of the string. - toFloat(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalDoubleif the specified string cannot be parsed into a regular, finitefloatvalue, else anOptionalDoublecontaining thefloatvalue parsed out of the string. - toInt(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalIntif the specified string cannot be parsed into a 32-bit integer, else anOptionalIntcontaining theintvalue parsed out of the string. - toLong(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalLongif the specified string cannot be parsed into a 64-bit integer, else anOptionalLongcontaining thelongvalue parsed out of the string. - toShort(String) - Static method in class org.klojang.convert.NumberMethods
-
Returns an empty
OptionalIntif the specified string cannot be parsed into a 16-bit integer, else anOptionalIntcontaining theshortvalue parsed out of the string. - TRUE_STRINGS - Static variable in class org.klojang.convert.Bool
-
The default set of strings that count as
truevalues (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
TypeConversionExceptionfor 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