|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<IsoType>
com.solab.iso8583.IsoType
public enum IsoType
Defines the possible values types that can be used in the fields. Some types required the length of the value to be specified (NUMERIC and ALPHA). Other types have a fixed length, like dates and times. Other types do not require a length to be specified, like LLVAR and LLLVAR.
| Enum Constant Summary | |
|---|---|
ALPHA
A fixed-length alphanumeric value. |
|
AMOUNT
An amount, expressed in cents with a fixed length of 12. |
|
BINARY
Similar to ALPHA but holds byte arrays instead of strings. |
|
DATE_EXP
A date in format yyMM |
|
DATE10
A date in format MMddHHmmss |
|
DATE4
A date in format MMdd |
|
LLBIN
Similar to LLVAR but holds byte arrays instead of strings. |
|
LLLBIN
Similar to LLLVAR but holds byte arrays instead of strings. |
|
LLLVAR
A variable length alphanumeric value with a 3-digit header length. |
|
LLVAR
A variable length alphanumeric value with a 2-digit header length. |
|
NUMERIC
A fixed-length numeric value. |
|
TIME
Time of day in format HHmmss |
|
| Method Summary | |
|---|---|
IsoValue<Object> |
call(Object val)
|
IsoValue<Object> |
call(Object val,
int len)
|
String |
format(BigDecimal value,
int length)
Formats the BigDecimal as an AMOUNT, NUMERIC, or a String. |
String |
format(Date value)
Formats a Date if the receiver is DATE10, DATE4, DATE_EXP or TIME; throws an exception otherwise. |
String |
format(long value,
int length)
Formats the integer value as a NUMERIC, an AMOUNT, or a String. |
String |
format(String value,
int length)
Formats the string to the given length (length is only useful if type is ALPHA, NUMERIC or BINARY). |
int |
getLength()
Returns the length of the type if it's always fixed, or 0 if it's variable. |
boolean |
needsLength()
Returns true if the type needs a specified length. |
IsoValue<Object> |
value(Object val)
|
IsoValue<Object> |
value(Object val,
int len)
|
static IsoType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static IsoType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final IsoType NUMERIC
public static final IsoType ALPHA
public static final IsoType LLVAR
public static final IsoType LLLVAR
public static final IsoType DATE10
public static final IsoType DATE4
public static final IsoType DATE_EXP
public static final IsoType TIME
public static final IsoType AMOUNT
public static final IsoType BINARY
public static final IsoType LLBIN
public static final IsoType LLLBIN
| Method Detail |
|---|
public static IsoType[] values()
for (IsoType c : IsoType.values()) System.out.println(c);
public static IsoType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic boolean needsLength()
public int getLength()
public String format(Date value)
public String format(String value,
int length)
public String format(long value,
int length)
public String format(BigDecimal value,
int length)
public IsoValue<Object> value(Object val,
int len)
public IsoValue<Object> value(Object val)
public IsoValue<Object> call(Object val,
int len)
public IsoValue<Object> call(Object val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||