|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jzos.fields.BinaryAsBigIntegerField
com.ibm.jzos.fields.BinaryAsBigDecimalField
public class BinaryAsBigDecimalField
A binary field with BigDecimal accessors. A "scale" determines the implied number of digits to the right of the decimal point.
Constructor Summary | |
---|---|
BinaryAsBigDecimalField(int offset,
int length,
int scale,
boolean signed)
Construct an instance. |
Method Summary | |
---|---|
boolean |
equals(java.math.BigDecimal a,
java.math.BigDecimal b)
Compare two BigDecimal instances, possibly null, for equality. |
java.math.BigDecimal |
getBigDecimal(byte[] buffer)
Answer a BigDecimal from the given byte array buffer, at the offset of this field. |
java.math.BigDecimal |
getBigDecimal(byte[] buffer,
int bufOffset)
Answer a BigDecimal from the given byte array buffer, at the bufOffset + offset of this field. |
int |
getScale()
|
void |
putBigDecimal(java.math.BigDecimal value,
byte[] buffer)
Put a BigDecimal into the given byte array buffer, at the offset of this field. |
void |
putBigDecimal(java.math.BigDecimal value,
byte[] buffer,
int bufOffset)
Put a BigDecimal into the given byte array buffer, at the bufOffset + offset of this field. |
Methods inherited from class com.ibm.jzos.fields.BinaryAsBigIntegerField |
---|
equals, getBigInteger, getBigInteger, getByteLength, getLength, getOffset, isSigned, putBigInteger, putBigInteger, setOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.jzos.fields.Field |
---|
getByteLength, getOffset, setOffset |
Constructor Detail |
---|
public BinaryAsBigDecimalField(int offset, int length, int scale, boolean signed)
offset
- int the offset of this fieldlength
- int the size in bytes of this fieldscale
- the number of implied decimal digits to the right of the decimal pointsigned
- boolean true if the value is signed, false if unsignedMethod Detail |
---|
public java.math.BigDecimal getBigDecimal(byte[] buffer)
getBigDecimal
in interface BigDecimalAccessor
buffer
- the byte array
public java.math.BigDecimal getBigDecimal(byte[] buffer, int bufOffset)
getBigDecimal
in interface BigDecimalAccessor
buffer
- the byte arraybufOffset
- the additional offset into the byte array
public void putBigDecimal(java.math.BigDecimal value, byte[] buffer) throws java.lang.IllegalArgumentException
putBigDecimal
in interface BigDecimalAccessor
value
- the BigDecimal valuebuffer
- the byte array
java.lang.IllegalArgumentException
- if the value is out of rangepublic void putBigDecimal(java.math.BigDecimal value, byte[] buffer, int bufOffset) throws java.lang.IllegalArgumentException
putBigDecimal
in interface BigDecimalAccessor
value
- the BigDecimal valuebuffer
- the byte arraybufOffset
- the additional offset into the byte array
java.lang.IllegalArgumentException
- if the value is out of rangepublic boolean equals(java.math.BigDecimal a, java.math.BigDecimal b)
a
- BigDecimalb
- BigDecimal
public int getScale()
getScale
in class BinaryAsBigIntegerField
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |