org.jbind.xml.instance.data
Class AbstractDecimalData

java.lang.Object
  extended byorg.jbind.xml.instance.data.AbstractData
      extended byorg.jbind.xml.instance.data.AbstractSimpleData
          extended byorg.jbind.xml.instance.data.AbstractDecimalData
All Implemented Interfaces:
IAnySimpleTypeData, IAnyTypeData, IDecimalData, IHasDigits, IHasOrder, IHasTotalOrder, ISimpleData, ITextContentProvider
Direct Known Subclasses:
AbstractIntegerData, DecimalData

public abstract class AbstractDecimalData
extends AbstractSimpleData
implements IDecimalData


Constructor Summary
AbstractDecimalData()
           
 
Method Summary
 int compareDecimal_(IDecimalData aData)
           
protected  void doAccept(java.lang.String aString)
          Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).
 int getNbDigits()
           
 int getNbFractionDigits()
           
 boolean isEqual(IHasOrder aData)
           
 boolean isGreater(IHasOrder aData)
           
 boolean isGreaterOrEqual(IHasOrder aData)
           
 boolean isLess(IHasOrder aData)
           
 boolean isLessOrEqual(IHasOrder aData)
           
 boolean simpleStorageValueEquals(IAnyTypeData aData)
          Checks if the simple storage value of this data object is equal to the simple storage object of the specified data objects.
 int simpleStorageValueHashCode()
          Calculates a hash code based on the simple storage value.
 
Methods inherited from class org.jbind.xml.instance.data.AbstractSimpleData
acceptImpl_, completeSimpleStorageAssignment_, doAcceptEnds_, doAcceptStarts_, getLexicalValue_, getNormalizedValue_, getObject, getTextContent_, setLexicalValue_, setObject, setSimpleStorageObject, toString
 
Methods inherited from class org.jbind.xml.instance.data.AbstractData
accept_, addReferencedData_, createElement_, createElement_, createUncheckedAttributeData_, equals, fetchByXPath_, getAttribute_, getDataDesc_, getFixed_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, iterReferencedData_, newElementData_, numberByXPath_, removeAttributeData_, selectByXPath_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_, stringByXPath_, testByXPath_
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.data.IDecimalData
compareSubTypeData_, getBigDecimal, setBigDecimal
 
Methods inherited from interface org.jbind.xml.core.data.IAnySimpleTypeData
getObject, setObject, toString
 
Methods inherited from interface org.jbind.xml.core.data.IAnyTypeData
accept_, acceptImpl_, addReferencedData_, createElement_, createElement_, equals, getAttribute_, getDataDesc_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_
 
Methods inherited from interface org.jbind.xml.core.data.ISimpleData
getCanonicalForm_, getLexicalValue_, getNormalizedValue_, getSimpleStorageObject, setLexicalValue_
 
Methods inherited from interface org.jbind.xml.core.base.ITextContentProvider
getTextContent_
 

Constructor Detail

AbstractDecimalData

public AbstractDecimalData()
Method Detail

doAccept

protected void doAccept(java.lang.String aString)
                 throws XmlException
Description copied from class: AbstractSimpleData
Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).

If an exception is raised during execution of the method then this data object may be inconsistent. It is in the responsibility of the caller either to rollback the changes or to discard this data object.

Overrides:
doAccept in class AbstractSimpleData
Parameters:
aString - (required).
Throws:
XmlException - Raised iff the string can not be converted into the internal representation.

simpleStorageValueEquals

public final boolean simpleStorageValueEquals(IAnyTypeData aData)
Description copied from interface: ISimpleData
Checks if the simple storage value of this data object is equal to the simple storage object of the specified data objects.

Specified by:
simpleStorageValueEquals in interface ISimpleData
Returns:
Returns true iff the simple storage values are equal.

simpleStorageValueHashCode

public final int simpleStorageValueHashCode()
Description copied from interface: ISimpleData
Calculates a hash code based on the simple storage value.

Specified by:
simpleStorageValueHashCode in interface ISimpleData
Returns:
A hash code.

isLess

public boolean isLess(IHasOrder aData)
Specified by:
isLess in interface IHasOrder

isLessOrEqual

public boolean isLessOrEqual(IHasOrder aData)
Specified by:
isLessOrEqual in interface IHasOrder

isEqual

public boolean isEqual(IHasOrder aData)
Specified by:
isEqual in interface IHasOrder

isGreaterOrEqual

public boolean isGreaterOrEqual(IHasOrder aData)
Specified by:
isGreaterOrEqual in interface IHasOrder

isGreater

public boolean isGreater(IHasOrder aData)
Specified by:
isGreater in interface IHasOrder

compareDecimal_

public final int compareDecimal_(IDecimalData aData)
Specified by:
compareDecimal_ in interface IDecimalData

getNbDigits

public final int getNbDigits()
Specified by:
getNbDigits in interface IHasDigits

getNbFractionDigits

public final int getNbFractionDigits()
Specified by:
getNbFractionDigits in interface IHasDigits