public class ExternalFloatField extends java.lang.Object implements DoubleAccessor
Field with double accessors.
In Cobol, refered to as "External Float".
| Constructor and Description |
|---|
ExternalFloatField(int offset,
int precision,
int scale,
boolean mantSign,
boolean expSign,
boolean impliedDecimal)
Construct an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Double aDouble,
double adouble)
Compare a Double with a double for equality.
|
int |
getByteLength()
Answer the length of the field described by the receiver
|
double |
getDouble(byte[] buffer)
Return a double from the given byte array buffer,
at the offset of this field.
|
double |
getDouble(byte[] buffer,
int bufOffset)
Return a double 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() |
int |
getScale() |
boolean |
isImpliedDecimal() |
boolean |
isShowExponentPlusSign() |
boolean |
isShowMantissaPlusSign() |
void |
putDouble(double value,
byte[] buffer)
Put a double value into the given byte array buffer,
at the offset of this field.
|
void |
putDouble(double value,
byte[] buffer,
int bufOffset)
Put a double value into the given byte array buffer,
at the bufOffset + offset of this field.
|
void |
setOffset(int offset) |
public ExternalFloatField(int offset,
int precision,
int scale,
boolean mantSign,
boolean expSign,
boolean impliedDecimal)
offset - int the offset of this fieldprecision - in the number of decimal degits of precisionscale - the number of implied decimal digits in the
fractional portion of the fieldmantSign - true if the '+' character is present for positive mantissa values.
A minus character '-' is always present for negative values.expSign - true if the '+' character is present for positive exponent values
A minus character '-' is always present for negative values.impliedDecimal - true if the decimal point is not explicitpublic double getDouble(byte[] buffer)
getDouble in interface DoubleAccessorbuffer - the byte arraypublic double getDouble(byte[] buffer,
int bufOffset)
getDouble in interface DoubleAccessorbuffer - the byte arraybufOffset - the additional offset into the byte arraypublic void putDouble(double value,
byte[] buffer)
putDouble in interface DoubleAccessorvalue - the double valuebuffer - the byte arrayjava.lang.IllegalArgumentException - if the value is Infinity or NaNpublic void putDouble(double value,
byte[] buffer,
int bufOffset)
putDouble in interface DoubleAccessorvalue - the double valuebuffer - the byte arraybufOffset - the additional offset into the byte arrayjava.lang.IllegalArgumentException - if the value is Infinity or NaNpublic int getByteLength()
FieldgetByteLength in interface FieldField.getByteLength()public int getOffset()
FieldgetOffset in interface FieldField.getOffset()public void setOffset(int offset)
setOffset in interface FieldField.setOffset(int)public boolean equals(java.lang.Double aDouble,
double adouble)
aDouble - possibly nulladouble - public boolean isImpliedDecimal()
public int getLength()
public int getPrecision()
public int getScale()
public boolean isShowExponentPlusSign()
public boolean isShowMantissaPlusSign()