|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.jzos.fields.ExternalDecimalAsIntField
public class ExternalDecimalAsIntField
An external (aka "display", "zoned") decimal field up to 9 digits with int accessors.
| Constructor Summary | |
|---|---|
ExternalDecimalAsIntField(int offset,
int precision,
boolean signed,
boolean signTrailing,
boolean signExternal,
boolean blankWhenZero)
Construct an instance |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Integer anInteger,
int anInt)
Compare an Integer, possibly null, with an int for equality. |
int |
getByteLength()
Answer the length of the field described by the receiver |
int |
getInt(byte[] buffer)
Answer an int value from the given byte array buffer, at the offset of this field. |
int |
getInt(byte[] buffer,
int bufOffset)
Answer an int value from the given byte array buffer, at the bufOffset + offset of this field. |
int |
getLength()
|
int |
getOffset()
Answer the offset of this field into some array of bytes |
int |
getPrecision()
|
boolean |
isBlankWhenZero()
|
boolean |
isSigned()
Answer whether the field is signed |
boolean |
isSignExternal()
|
boolean |
isSignTrailing()
|
void |
putInt(int value,
byte[] buffer)
Put an int value into the given byte array buffer, at the offset of this field. |
void |
putInt(int value,
byte[] buffer,
int bufOffset)
Put an int value into the given byte array buffer, at the bufOffset + offset of this field. |
void |
setOffset(int offset)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalDecimalAsIntField(int offset,
int precision,
boolean signed,
boolean signTrailing,
boolean signExternal,
boolean blankWhenZero)
offset - position of this fieldprecision - total number of digits <= 9.signed - if the field has a sign somewheresignTrailing - true if the sign follows the field, false if it precedes itsignExternal - true if the sign occupies a separate byte, false if it only occupies a high-order nibble
Note: signTailing and signExternal are ignored if signed is not true.| Method Detail |
|---|
public int getByteLength()
Field
getByteLength in interface Fieldpublic int getOffset()
Field
getOffset in interface Fieldpublic void setOffset(int offset)
setOffset in interface FieldField.getOffset()public int getInt(byte[] buffer)
getInt in interface IntAccessorbuffer - the byte array
public int getInt(byte[] buffer,
int bufOffset)
getInt in interface IntAccessorbuffer - the byte arraybufOffset - the additional offset into the byte array
public void putInt(int value,
byte[] buffer)
throws java.lang.IllegalArgumentException
putInt in interface IntAccessorvalue - the signed int valuebuffer - the byte array
java.lang.IllegalArgumentException - if the value is out of range
public void putInt(int value,
byte[] buffer,
int bufOffset)
throws java.lang.IllegalArgumentException
putInt in interface IntAccessorvalue - the int valuebuffer - the byte arraybufOffset - the additional offset into the byte array
java.lang.IllegalArgumentException - if the value is out of rangepublic boolean isSigned()
isSigned in interface IntAccessor
public boolean equals(java.lang.Integer anInteger,
int anInt)
anInteger - anInt -
public boolean isBlankWhenZero()
public int getLength()
public int getPrecision()
public boolean isSignExternal()
public boolean isSignTrailing()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||