public class LongTransformer extends AbstractIntegerTransformer<Long>
A specialized number transformer implementation that deals with numbers of
type java.lang.Long
.
This class implements the abstract methods defined by its super classes in a
way suitable for java.lang.Long
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 |
---|
LongTransformer() |
Modifier and Type | Method and Description |
---|---|
protected Long |
convert(Number n)
Converts the given number into a
Long . |
protected Long |
fetchProperty(org.apache.commons.configuration.Configuration config,
String property,
Long defaultValue)
Fetches a long property from the specified configuration.
|
createFormat
errorResult, getMaximum, getMinimum, isNumberValid, isValid, setMaximum, setMinimum, transform, transformToNumber
protected Long convert(Number n)
Long
. This
implementation also checks whether the number fits into the value range
of Long
and throws an
IllegalArgumentException
if not.convert
in class NumberTransformerBase<Long>
n
- the number to convertIllegalArgumentException
- if the number cannot be converted to a
Long
protected Long fetchProperty(org.apache.commons.configuration.Configuration config, String property, Long defaultValue)
fetchProperty
in class NumberTransformerBase<Long>
config
- the configurationproperty
- the propertydefaultValue
- the default valueCopyright © 2016 The JGUIraffe Team. All rights reserved.