Class NumberProvider
java.lang.Object
de.yamass.redg.runtime.defaultvalues.pluggable.NumberProvider
- All Implemented Interfaces:
DefaultValueStrategy
,PluggableDefaultValueProvider
- Direct Known Subclasses:
IncrementingNumberProvider
,StaticNumberProvider
A
PluggableDefaultValueProvider
that is capable of providing numbers.
The supported number types are
- BigDecimal
- Double
- Float
- Long
- Integer
- Byte
- Short
- AtomicInteger
- AtomicLong
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
convertNumber
(BigDecimal number, Class<T> type) boolean
willProvide
(ColumnModel columnModel) Use this to perform your checks whether the class can and should provide a default value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.yamass.redg.runtime.defaultvalues.DefaultValueStrategy
getDefaultValue
-
Constructor Details
-
NumberProvider
public NumberProvider()
-
-
Method Details
-
willProvide
Description copied from interface:PluggableDefaultValueProvider
Use this to perform your checks whether the class can and should provide a default value. Only returntrue
if the class really can provide a valid default value.- Specified by:
willProvide
in interfacePluggableDefaultValueProvider
- Parameters:
columnModel
- the column model of the column that needs a default value- Returns:
true
if the class can and should provide a valid default value,false
otherwise
-
convertNumber
-