public class IntType extends BaseValueType<Integer>
Integer type.
This class is threadsafe and uses a singleton pattern to prevent multiple instances, since all users can safely share the same instance.
clazzType| Modifier and Type | Method and Description |
|---|---|
Integer |
cast(Object o)
Attempt to cast the passed object to the generic type T.
|
static IntType |
get()
Deprecated.
since 0.4.1. Use
instance() instead |
static IntType |
instance() |
Integer |
parse(String sourceValue)
Parses a String to an
Integer. |
getDestinationType, isParsable, toString@Deprecated public static IntType get()
instance() insteadIntType()public Integer parse(String sourceValue) throws ParsingException
Integer. The String should already be trimmed.
Parsing is done via Integer.parseInt(String).
sourceValue - The source string, which should already be trimmed and may be nullParsingException - if unparsable.public Integer cast(Object o) throws RuntimeException
ValueTypeRuntimeExceptionCopyright © 2021. All rights reserved.