|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.solab.iso8583.IsoValue<T>
public class IsoValue<T>
Represents a value that is stored in a field inside an ISO8583 message. It can format the value when the message is generated. Some values have a fixed length, other values require a length to be specified so that the value can be padded to the specified length. LLVAR and LLLVAR values do not need a length specification because the length is calculated from the stored value.
Constructor Summary | |
---|---|
IsoValue(IsoType t,
T value)
|
|
IsoValue(IsoType t,
T value,
CustomField<T> custom)
Creates a new instance that stores the specified value as the specified type. |
|
IsoValue(IsoType t,
T val,
int len)
|
|
IsoValue(IsoType t,
T val,
int len,
CustomField<T> custom)
Creates a new instance that stores the specified value as the specified type. |
Method Summary | |
---|---|
IsoValue<T> |
clone()
Returns a copy of the receiver that references the same value object. |
boolean |
equals(Object other)
Returns true of the other object is also an IsoValue and has the same type and length, and if other.getValue().equals(getValue()) returns true. |
int |
getLength()
Returns the length of the stored value, of the length of the formatted value in case of NUMERIC or ALPHA. |
IsoType |
getType()
Returns the ISO type to which the value must be formatted. |
T |
getValue()
Returns the stored value without any conversion or formatting. |
int |
hashCode()
|
String |
toString()
Returns the formatted value as a String. |
void |
write(OutputStream outs,
boolean binary)
Writes the formatted value to a stream, with the length header if it's a variable length type. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IsoValue(IsoType t, T value)
public IsoValue(IsoType t, T value, CustomField<T> custom)
t
- the ISO type.value
- The value to be stored.custom
- An optional CustomField to encode/decode a custom value.public IsoValue(IsoType t, T val, int len)
public IsoValue(IsoType t, T val, int len, CustomField<T> custom)
t
- The ISO8583 type for this field.val
- The value to store in the field.len
- The length for the value.custom
- An optional CustomField to encode/decode a custom value.Method Detail |
---|
public IsoType getType()
public int getLength()
public T getValue()
public String toString()
toString
in class Object
public IsoValue<T> clone()
clone
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void write(OutputStream outs, boolean binary) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |