com.objsys.asn1j.runtime
Class Asn1BigDecimal

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1Type
      extended by com.objsys.asn1j.runtime.Asn1Real
          extended by com.objsys.asn1j.runtime.Asn1BigDecimal
All Implemented Interfaces:
Asn1TypeIF, java.io.Serializable, java.lang.Cloneable

public class Asn1BigDecimal
extends Asn1Real

This class represents the Xml Schema BigDecimal built-in type.

See Also:
Serialized Form

Field Summary
 java.math.BigDecimal value
          This public member variable is where the double value is stored.
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1Real
TAG
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1Type
BIT_STRING, BMPString, BOOLEAN, DATE, DATE_TIME, DURATION, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, mAsn1TypeName, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OID_IRI, OpenType, PrintableString, REAL, RELATIVE_OID_IRI, RelativeOID, SEQUENCE, SET, T61String, TeletexString, TIME, TIME_OF_DAY, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString
 
Constructor Summary
Asn1BigDecimal()
          The default constructor sets the double value to zero.
Asn1BigDecimal(java.math.BigDecimal value_)
          This constructor creates an REAL object from a double value.
Asn1BigDecimal(double value_)
          This constructor creates an REAL object from a double value.
 
Method Summary
 void decodeXML(java.lang.String buffer, java.lang.String attrs)
          This method decodes an ASN.1 real value using the XML schema encoding rules.
 void encode(Asn1XmlEncoder buffer, java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an xsd:BigDecimal value using the XML Encoding as specified in the W3C XML schema standard.
 void encodeAttribute(Asn1XmlEncoder buffer, java.lang.String attrName)
          This method encodes an ASN.1 real value using the XML Encoding as specified in the W3C XML schema standard(asn2xsd).
 java.lang.String encodeBigDecimal()
           
 boolean equals(double dvalue)
          This method compares this REAL value to the given value for equality.
 boolean equals(java.lang.Object o)
          This method compares this REAL value to the given Object for equality.
 java.lang.String toString()
          This method will return a string representation of the REAL value.
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1Real
decode, decode, decode, decodeXER, encode, encode, encode, encode, encode, encode, encode, encodeValue, getAsn1TypeName, hashCode, normalizedRealValueToString
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1Type
clone, decode, decode, decode, decode, decode, encode, encode, equals, getLength, getTypeName, indent, isOpenType, matchTag, matchTag, pdiag, print, setKey, setOpenType
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public transient java.math.BigDecimal value
This public member variable is where the double value is stored. This is the value that is encoded when one of the encode methods is called. It is also where the decoded result is stored when a decode method is called.

Constructor Detail

Asn1BigDecimal

public Asn1BigDecimal()
The default constructor sets the double value to zero.


Asn1BigDecimal

public Asn1BigDecimal(double value_)
This constructor creates an REAL object from a double value.

Parameters:
value_ - double value

Asn1BigDecimal

public Asn1BigDecimal(java.math.BigDecimal value_)
This constructor creates an REAL object from a double value.

Parameters:
value_ - double value
Method Detail

encode

public void encode(Asn1XmlEncoder buffer,
                   java.lang.String elemName,
                   java.lang.String nsPrefix)
            throws java.io.IOException,
                   Asn1Exception
This method encodes an xsd:BigDecimal value using the XML Encoding as specified in the W3C XML schema standard.

Overrides:
encode in class Asn1Real
Parameters:
buffer - Encode message buffer object
elemName - Element name
Throws:
java.io.IOException
Asn1Exception

encodeAttribute

public void encodeAttribute(Asn1XmlEncoder buffer,
                            java.lang.String attrName)
                     throws Asn1Exception,
                            java.io.IOException
This method encodes an ASN.1 real value using the XML Encoding as specified in the W3C XML schema standard(asn2xsd).

Overrides:
encodeAttribute in class Asn1Real
Parameters:
buffer - Encode message buffer object
attrName - Attribute name
Throws:
Asn1Exception
java.io.IOException

encodeBigDecimal

public java.lang.String encodeBigDecimal()

decodeXML

public void decodeXML(java.lang.String buffer,
                      java.lang.String attrs)
               throws Asn1Exception
This method decodes an ASN.1 real value using the XML schema encoding rules.

Specified by:
decodeXML in interface Asn1TypeIF
Overrides:
decodeXML in class Asn1Real
Parameters:
buffer - String containing data to be decoded
attrs - Attributes string from element tag
Throws:
Asn1Exception

equals

public boolean equals(double dvalue)
This method compares this REAL value to the given value for equality.

Overrides:
equals in class Asn1Real
Parameters:
dvalue - REAL test value

equals

public boolean equals(java.lang.Object o)
Description copied from class: Asn1Real
This method compares this REAL value to the given Object for equality.

Overrides:
equals in class Asn1Real

toString

public java.lang.String toString()
This method will return a string representation of the REAL value. The format is the ASN.1 value format for this type..

Overrides:
toString in class Asn1Real
Returns:
Stringified representation of the value