jPOS 1.6.7 API Documentation

org.jpos.iso
Class ISOAmount

java.lang.Object
  extended by org.jpos.iso.ISOComponent
      extended by org.jpos.iso.ISOAmount
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable

public class ISOAmount
extends ISOComponent
implements java.lang.Cloneable, java.io.Externalizable

See Also:
Serialized Form

Constructor Summary
ISOAmount()
           
ISOAmount(int fieldNumber)
           
ISOAmount(int fieldNumber, int currencyCode, java.math.BigDecimal amount)
           
 
Method Summary
 void dump(java.io.PrintStream p, java.lang.String indent)
           
 java.math.BigDecimal getAmount()
           
 java.lang.String getAmountAsLegacyString()
           
 java.lang.String getAmountAsString()
           
 int getCurrencyCode()
           
 java.lang.String getCurrencyCodeAsString()
           
 java.lang.Object getKey()
          valid on Leafs only.
 int getScale()
           
 java.lang.String getScaleAsString()
           
 java.lang.Object getValue()
          valid on Leafs only.
 byte[] pack()
           
 void readExternal(java.io.ObjectInput in)
           
 void setFieldNumber(int fieldNumber)
          changes this Component field number
Use with care, this method does not change any reference held by a Composite.
 void setValue(java.lang.Object obj)
           
 int unpack(byte[] b)
           
 void unpack(java.io.InputStream in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class org.jpos.iso.ISOComponent
getBytes, getChildren, getComposite, getMaxField, pack, set, unset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISOAmount

public ISOAmount()

ISOAmount

public ISOAmount(int fieldNumber)

ISOAmount

public ISOAmount(int fieldNumber,
                 int currencyCode,
                 java.math.BigDecimal amount)
Method Detail

getKey

public java.lang.Object getKey()
Description copied from class: ISOComponent
valid on Leafs only. The value returned is used by ISOMsg as a key to this field.

Overrides:
getKey in class ISOComponent
Returns:
object representing the field number

getValue

public java.lang.Object getValue()
                          throws ISOException
Description copied from class: ISOComponent
valid on Leafs only.

Overrides:
getValue in class ISOComponent
Returns:
object representing the field value
Throws:
ISOException

setValue

public void setValue(java.lang.Object obj)
              throws ISOException
Specified by:
setValue in class ISOComponent
Throws:
ISOException

setFieldNumber

public void setFieldNumber(int fieldNumber)
Description copied from class: ISOComponent
changes this Component field number
Use with care, this method does not change any reference held by a Composite.

Specified by:
setFieldNumber in class ISOComponent
Parameters:
fieldNumber - new field number

getAmount

public java.math.BigDecimal getAmount()

getScale

public int getScale()

getScaleAsString

public java.lang.String getScaleAsString()

getCurrencyCode

public int getCurrencyCode()

getCurrencyCodeAsString

public java.lang.String getCurrencyCodeAsString()
                                         throws ISOException
Throws:
ISOException

getAmountAsLegacyString

public java.lang.String getAmountAsLegacyString()
                                         throws ISOException
Throws:
ISOException

getAmountAsString

public java.lang.String getAmountAsString()
                                   throws ISOException
Throws:
ISOException

pack

public byte[] pack()
            throws ISOException
Specified by:
pack in class ISOComponent
Throws:
ISOException

unpack

public int unpack(byte[] b)
           throws ISOException
Specified by:
unpack in class ISOComponent
Throws:
ISOException

unpack

public void unpack(java.io.InputStream in)
            throws ISOException
Specified by:
unpack in class ISOComponent
Throws:
ISOException

dump

public void dump(java.io.PrintStream p,
                 java.lang.String indent)
Specified by:
dump in class ISOComponent

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

jPOS.org