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> TconvertNumber(BigDecimal number, Class<T> type) booleanwillProvide(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, waitMethods inherited from interface de.yamass.redg.runtime.defaultvalues.DefaultValueStrategy
getDefaultValue
-
Constructor Details
-
NumberProvider
public NumberProvider()
-
-
Method Details
-
willProvide
Description copied from interface:PluggableDefaultValueProviderUse this to perform your checks whether the class can and should provide a default value. Only returntrueif the class really can provide a valid default value.- Specified by:
willProvidein interfacePluggableDefaultValueProvider- Parameters:
columnModel- the column model of the column that needs a default value- Returns:
trueif the class can and should provide a valid default value,falseotherwise
-
convertNumber
-