org.jpos.iso
Class ISOAmount
java.lang.Object
org.jpos.iso.ISOComponent
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
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ISOAmount
public ISOAmount()
ISOAmount
public ISOAmount(int fieldNumber)
ISOAmount
public ISOAmount(int fieldNumber,
int currencyCode,
java.math.BigDecimal amount)
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