org.jpos.iso
Class ISOAmount
java.lang.Object
org.jpos.iso.ISOComponent
org.jpos.iso.ISOAmount
- All Implemented Interfaces:
- Externalizable, Serializable, Cloneable
public class ISOAmount
- extends ISOComponent
- implements Cloneable, Externalizable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ISOAmount
public ISOAmount()
ISOAmount
public ISOAmount(int fieldNumber)
ISOAmount
public ISOAmount(int fieldNumber,
int currencyCode,
BigDecimal amount)
getKey
public 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 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(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 BigDecimal getAmount()
getScale
public int getScale()
getScaleAsString
public String getScaleAsString()
getCurrencyCode
public int getCurrencyCode()
getCurrencyCodeAsString
public String getCurrencyCodeAsString()
throws ISOException
- Throws:
ISOException
getAmountAsLegacyString
public String getAmountAsLegacyString()
throws ISOException
- Throws:
ISOException
getAmountAsString
public 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(InputStream in)
throws ISOException
- Specified by:
unpack in class ISOComponent
- Throws:
ISOException
dump
public void dump(PrintStream p,
String indent)
- Specified by:
dump in class ISOComponent
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal in interface Externalizable
- Throws:
IOException
ClassNotFoundException
Copyright © 1998-2012 jPOS.org. All Rights Reserved.