public interface IDatatype
ICallTarget
,
ICallTarget2
,
ICancelTarget
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_CLASS_BINARY |
static int |
TYPE_CLASS_FLOAT |
static int |
TYPE_CLASS_GROUP |
static int |
TYPE_CLASS_MASK |
static int |
TYPE_CLASS_PACKED_DECIMAL |
static int |
TYPE_CLASS_TABLE |
static int |
TYPE_CLASS_TEXT |
static int |
TYPE_CLASS_ZONED |
static int |
TYPE_INVALID |
static int |
TYPE_JUST_LEFT |
static int |
TYPE_JUST_MASK |
static int |
TYPE_JUST_RIGHT |
static int |
TYPE_NON_NUMERIC |
static int |
TYPE_NUMERIC |
static int |
TYPE_NUMERIC_MASK |
static int |
TYPE_REDEFINES |
static int |
TYPE_SIGN_LEAD |
static int |
TYPE_SIGN_LEAD_SEP |
static int |
TYPE_SIGN_MASK |
static int |
TYPE_SIGN_NONE |
static int |
TYPE_SIGN_TRAIL |
static int |
TYPE_SIGN_TRAIL_SEP |
static int |
TYPE_VARIANT_0 |
static int |
TYPE_VARIANT_1 |
static int |
TYPE_VARIANT_2 |
static int |
TYPE_VARIANT_3 |
static int |
TYPE_VARIANT_4 |
static int |
TYPE_VARIANT_5 |
static int |
TYPE_VARIANT_6 |
static int |
TYPE_VARIANT_7 |
static int |
TYPE_VARIANT_MASK |
Modifier and Type | Method and Description |
---|---|
void |
fromBigDecimal(java.math.BigDecimal param)
Conversion method.
|
void |
fromBoolean(boolean param)
Conversion method.
|
void |
fromByte(byte param)
Conversion method.
|
void |
fromByteArray(byte[] param)
Set the internal byte representation using the given byte[].
|
void |
fromByteArray(byte[] param,
int offset,
int length)
Set the internal byte representation using the given byte[].
|
void |
fromChar(char param)
Conversion method.
|
void |
fromDataPointer(byte[] param)
Replace the backing memory of a variable.
|
void |
fromDatatype(IDatatype param)
Conversion method.
|
void |
fromDouble(double param)
Conversion method.
|
void |
fromFloat(float param)
Conversion method.
|
void |
fromInt(int param)
Conversion method.
|
void |
fromLong(long param)
Conversion method.
|
void |
fromShort(short param)
Conversion method.
|
void |
fromText(java.lang.String param)
Conversion method.
|
int |
getDecimalPositions()
The number of decimal positions, where meaningful.
|
java.lang.Object[] |
getElements()
If this IDatatype is composed of other Datatypes,
return the Datatypes of which this is composed.
|
int |
getLength()
The length (including OCCURS DEPENDING ON calculations).
|
int |
getSize()
The maximum size available
|
int |
getType()
Return one the TYPE_ types that best describes this IDatatype.
|
java.math.BigDecimal |
toBigDecimal()
Conversion method.
|
boolean |
toBoolean()
Conversion method.
|
byte |
toByte()
Conversion method.
|
byte[] |
toByteArray()
Return copy of the internal byte representation.
|
void |
toByteArray(byte[] param,
int offset,
int length)
Return copy of the internal byte representation.
|
char |
toChar()
Conversion method.
|
IDatatype |
toDatatype()
Conversion method.
|
double |
toDouble()
Conversion method.
|
float |
toFloat()
Conversion method.
|
int |
toInt()
Conversion method.
|
long |
toLong()
Conversion method.
|
short |
toShort()
Conversion method.
|
java.lang.String |
toText()
Conversion method.
|
static final int TYPE_INVALID
static final int TYPE_SIGN_MASK
static final int TYPE_JUST_MASK
static final int TYPE_NUMERIC_MASK
static final int TYPE_CLASS_MASK
static final int TYPE_VARIANT_MASK
static final int TYPE_SIGN_NONE
static final int TYPE_SIGN_LEAD
static final int TYPE_SIGN_TRAIL
static final int TYPE_SIGN_LEAD_SEP
static final int TYPE_SIGN_TRAIL_SEP
static final int TYPE_JUST_LEFT
static final int TYPE_JUST_RIGHT
static final int TYPE_NUMERIC
static final int TYPE_NON_NUMERIC
static final int TYPE_CLASS_ZONED
static final int TYPE_CLASS_BINARY
static final int TYPE_CLASS_PACKED_DECIMAL
static final int TYPE_CLASS_FLOAT
static final int TYPE_CLASS_TEXT
static final int TYPE_CLASS_GROUP
static final int TYPE_CLASS_TABLE
static final int TYPE_VARIANT_0
static final int TYPE_VARIANT_1
static final int TYPE_VARIANT_2
static final int TYPE_VARIANT_3
static final int TYPE_VARIANT_4
static final int TYPE_VARIANT_5
static final int TYPE_VARIANT_6
static final int TYPE_VARIANT_7
static final int TYPE_REDEFINES
int getType()
The SIGN clauses describe the sign storage ability of the datatype. The JUST clauses describe the left/right justification of the datatype. The NUMERIC/NON-NUMERIC describe the general storage class; this overlaps with CLASS.
The CLASS clauses describe the general numeric or non-numeric storage format, but not the particular storage bytes used. The particular storage bytes used are further described with VARIANT clauses.
The GROUP and TABLE classes may be further analyzed using the getElements() method to obtain the component Datatypes.
All invalid types are negative.
int getLength()
int getSize()
int getDecimalPositions()
byte[] toByteArray()
fromByteArray(byte[])
void toByteArray(byte[] param, int offset, int length)
param
- byte[] is the destination for the copyoffset
- into the byte[]length
- for the given lengthvoid fromByteArray(byte[] param)
param
- the byte[] from which to copy.toByteArray()
void fromByteArray(byte[] param, int offset, int length)
param
- byte[] is the source of the copyoffset
- into the byte[]length
- for the given lengthtoByteArray()
boolean toBoolean()
fromBoolean(boolean)
byte toByte()
fromByte(byte)
char toChar()
fromChar(char)
short toShort()
fromShort(short)
int toInt()
fromInt(int)
long toLong()
fromLong(long)
float toFloat()
fromFloat(float)
double toDouble()
fromDouble(double)
java.math.BigDecimal toBigDecimal()
fromBigDecimal(java.math.BigDecimal)
IDatatype toDatatype()
fromDatatype(com.heirloomcomputing.ecs.api.IDatatype)
java.lang.String toText()
fromText(java.lang.String)
void fromBoolean(boolean param)
param
- - boolean value by which to set the IDatatype.toBoolean()
void fromByte(byte param)
param
- - byte value by which to set the IDatatype.toByte()
void fromChar(char param)
param
- - char value by which to set the IDatatype.toChar()
void fromShort(short param)
param
- - short value by which to set the IDatatype.toShort()
void fromInt(int param)
param
- - int value by which to set the IDatatype.toInt()
void fromLong(long param)
param
- - long value by which to set the IDatatype.toLong()
void fromFloat(float param)
param
- - float value by which to set the IDatatype.toFloat()
void fromDouble(double param)
param
- - double value by which to set the IDatatype.toDouble()
void fromBigDecimal(java.math.BigDecimal param)
param
- - java.math.BigDecimal value by which to set the IDatatype.toBigDecimal()
void fromDatatype(IDatatype param)
param
- - IDatatype value by which to set the IDatatype.toDatatype()
void fromText(java.lang.String param)
param
- value by which to set the IDatatype.toText()
void fromDataPointer(byte[] param)
param
- - byte array that represents the memory for the variablejava.lang.Object[] getElements()
This should not decompose into artificial Datatypes; that is, a text IDatatype should not return an array of Datatypes for each character in the text under normal circumstantces.
The Object[] may contain other arrays rather than Datatypes; these arrays for multi-dimensional structures must be traversed to obtain all elements.