public abstract class NumberDataType<E extends Number & Comparable<E>> extends ComparableDataType<E>
ComparableDataType.MaxRestriction, ComparableDataType.MinRestrictionBasicDataType.AbstractRestriction<D extends Serializable>, BasicDataType.DataTypeComparator<D>, BasicDataType.EnumerationRestriction, BasicDataType.RequiredRestriction, BasicDataType.RestrictedEnumerationIterator, BasicDataType.StaticAbstractRestriction<D extends Serializable>, BasicDataType.TypeRestriction, BasicDataType.UniqueRestrictionDataType.Restriction<D extends Serializable>| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
allowSpecialNumbers |
maxRestriction, minRestrictionDATATYPE_BUNDLE, defaultValue, enumerationRestriction, origin, requiredRestriction, typeRestriction, uniqueRestrictiondescription, guiName, keyENFORCE_ABSOLUTE, ENFORCE_ALWAYS, ENFORCE_NEVER, ENFORCE_ONCHANGE, ENFORCE_ONCREATE, ENFORCE_ONVALIDATE, PROCESS_GET, PROCESS_SET, VALID, XMLNS| Constructor and Description |
|---|
NumberDataType(String name,
Class<E> classType)
Constructor for Number field.
|
| Modifier and Type | Method and Description |
|---|---|
protected E |
cast(Object value,
Cloud cloud,
Node node,
Field field)
Utility to avoid repetitive calling of getCloud
|
protected Number |
castString(Object preCast,
Cloud cloud) |
protected Object |
castToValidate(Object value,
Node node,
Field field)
Before validating the value, the value will be 'cast', on default this will be to the
'correct' type, but it can be a more generic type sometimes.
|
void |
setAllowSpecialNumbers(boolean sn) |
protected Number |
toNumber(String s) |
clone, cloneRestrictions, compare, getComparator, getDefaultValue, getEnforceStrength, getMaxRestriction, getMinRestriction, inheritRestrictions, isMaxInclusive, isMinInclusive, setMax, setMin, toStringBuilder, toXml, validateCastValueaddErrorDescription, addRestriction, addRestriction, addStyleClass, cast, castAndValidate, castForSearch, castToPresent, checkType, clone, compareTo, edit, equals, finish, finish, getBaseType, getBaseTypeIdentifier, getCloud, getCloud, getCommitProcessor, getDefaultProcessor, getDefaultValue, getDeleteProcessor, getElement, getElement, getEnforceString, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getProcessorWithoutDefault, getRequiredRestriction, getRestrictions, getStyleClasses, getTypeAsClass, getUniqueRestriction, hashCode, inherit, inheritProperties, isCorrectType, isFinished, isRequired, isUnique, preCast, preCast, preCast, rewrite, setCommitProcessor, setDefaultProcessor, setDefaultValue, setDeleteProcessor, setProcessor, setProcessor, setRequired, setUnique, setXml, toString, toXml, validate, validate, validateCastValueOrNull, validateRequired, xmlValuegetDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUINamefinalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUINamepublic void setAllowSpecialNumbers(boolean sn)
protected Number toNumber(String s) throws CastException
CastExceptionprotected Number castString(Object preCast, Cloud cloud) throws CastException
CastExceptionprotected Object castToValidate(Object value, Node node, Field field) throws CastException
BasicDataTypecastToValidate in class BasicDataType<E extends Number & Comparable<E>>CastExceptionprotected E cast(Object value, Cloud cloud, Node node, Field field) throws CastException
BasicDataTypecast in class BasicDataType<E extends Number & Comparable<E>>CastExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}