Index

B C D E F G I M N O P T V 
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 provided true strings and false strings to evaluate String 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 the EnumParser.DEFAULT_NORMALIZER.
EnumParser(Class<T>, UnaryOperator<String>) - Constructor for class org.klojang.convert.EnumParser
Creates an EnumParser for the specified enum class, using the specified normalizer 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 specified normalizer 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 a Boolean value.
from(char) - Static method in class org.klojang.convert.Bool
Converts the specified character to a Boolean value.
from(double) - Static method in class org.klojang.convert.Bool
Converts the specified double to a Boolean value.
from(float) - Static method in class org.klojang.convert.Bool
Converts the specified float to a Boolean value.
from(int) - Static method in class org.klojang.convert.Bool
Converts the specified int to a Boolean value.
from(long) - Static method in class org.klojang.convert.Bool
Converts the specified long to a Boolean value.
from(short) - Static method in class org.klojang.convert.Bool
Converts the specified short to a Boolean value.
from(Number) - Static method in class org.klojang.convert.Bool
Converts the specified Number to a Boolean 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 a Boolean 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 a BigDecimal.
isBigInteger(String) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified string can be parsed into a BigInteger without loss of information.
isBoolean(String) - Method in class org.klojang.convert.Bool
Returns true if the specified string is null or one of the string that count as true or false.
isByte(String) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified string can be parsed into a byte without loss of information.
isConvertible(String) - Static method in class org.klojang.convert.Bool
Returns true if the specified string is null or one of the string that count as true or false.
isDouble(String) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified string can be parsed into a double without loss of information.
isFloat(String) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified string can be parsed into a float without loss of information.
isInt(String) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified string can be parsed into an int without loss of information.
isIntegral(Class<?>) - Static method in class org.klojang.convert.NumberMethods
Returns true if the specified class is one of Byte, 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 a long 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 a short 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 a BigDecimal.
MAX_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
Long.MAX_VALUE converted to a BigDecimal.
MAX_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
Long.MAX_VALUE converted to a BigInteger.
MIN_DOUBLE_BD - Static variable in class org.klojang.convert.NumberMethods
Double.MIN_VALUE converted to a BigDecimal.
MIN_LONG_BD - Static variable in class org.klojang.convert.NumberMethods
Long.MIN_VALUE converted to a BigDecimal.
MIN_LONG_BI - Static variable in class org.klojang.convert.NumberMethods
Long.MIN_VALUE converted to a BigInteger.
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 a Boolean value.
test(char) - Method in class org.klojang.convert.Bool
Converts the specified char to a Boolean value.
test(double) - Method in class org.klojang.convert.Bool
Converts the specified double to a Boolean value.
test(float) - Method in class org.klojang.convert.Bool
Converts the specified float to a Boolean value.
test(int) - Method in class org.klojang.convert.Bool
Converts the specified int to a Boolean value.
test(long) - Method in class org.klojang.convert.Bool
Converts the specified long to a Boolean value.
test(short) - Method in class org.klojang.convert.Bool
Converts the specified short to a Boolean value.
test(Number) - Method in class org.klojang.convert.Bool
Converts the specified Number to a Boolean 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 a Boolean 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 a BigDecimal.
toBigDecimal(String) - Static method in class org.klojang.convert.NumberMethods
Returns an empty Optional if the specified string cannot be parsed into BigDecimal, else an Optional containing the BigDecimal 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 an Optional containing the BigInteger 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 an OptionalInt containing the byte 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 a double value, else an OptionalDouble containing the double 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, finite float value, else an OptionalDouble containing the float 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 an OptionalInt containing the int 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 an OptionalLong containing the long 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 an OptionalInt containing the short 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.
B C D E F G I M N O P T V 
All Classes and Interfaces|All Packages|Serialized Form