public class IntegerTransformer extends AbstractIntegerTransformer<Integer>
A specialized number transformer implementation that deals with numbers of
type java.lang.Integer
.
This class implements the abstract methods defined by its super classes in a
way suitable for java.lang.Integer
objects. It does not define
any new properties or error messages. Refer to the documentation of
for a list of all supported
properties and possible error messages.
NumberTransformerBase
PROP_MAXIMUM, PROP_MINIMUM
Constructor and Description |
---|
IntegerTransformer() |
Modifier and Type | Method and Description |
---|---|
protected Integer |
convert(Number n)
Converts the given number to an
java.lang.Integer . |
protected Integer |
fetchProperty(org.apache.commons.configuration.Configuration config,
String property,
Integer defaultValue)
Fetches a configuration property of type integer.
|
createFormat
errorResult, getMaximum, getMinimum, isNumberValid, isValid, setMaximum, setMinimum, transform, transformToNumber
protected Integer convert(Number n)
java.lang.Integer
. We
also check whether the number fits into the value range supported by
integers.convert
in class NumberTransformerBase<Integer>
n
- the number to convertIllegalArgumentException
- if the number cannot be convertedprotected Integer fetchProperty(org.apache.commons.configuration.Configuration config, String property, Integer defaultValue)
fetchProperty
in class NumberTransformerBase<Integer>
config
- the configurationproperty
- the property to fetchdefaultValue
- the default valueCopyright © 2016 The JGUIraffe Team. All rights reserved.