|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.latencybusters.lbm.sdm.LBMSDM
com.latencybusters.lbm.sdm.LBMSDMField
com.latencybusters.lbm.sdm.LBMSDMFieldDecimal
public class LBMSDMFieldDecimal
Implements an SDM Field of type Decimal
| Field Summary | |
|---|---|
protected LBMSDMRawDecimal |
internalValue
The internal data storage for this field |
| Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM |
|---|
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING |
| Constructor Summary | |
|---|---|
protected |
LBMSDMFieldDecimal(short type,
java.lang.String name)
Constructor for array subclasses |
|
LBMSDMFieldDecimal(java.lang.String name)
Constructor for an empty decimal field. |
|
LBMSDMFieldDecimal(java.lang.String name,
LBMSDMRawDecimal v)
Constructor for a decimal field with a known decimal |
|
LBMSDMFieldDecimal(java.lang.String name,
long mant,
int exp)
Constructor for a decimal field providing the mantissa and exponent |
| Method Summary | |
|---|---|
LBMSDMFieldDecimal |
clone()
Get a copy of this object |
static int |
fixed_size()
Get the length of formatted field (static field) |
int |
format(byte[] buf,
int offset)
Format a raw decimal in to a byte buffer |
int |
get_base_len()
Get the length of base formatted field This is used by the respective array class |
int |
get_len()
Get the length of formatted field |
LBMSDMRawDecimal |
get()
Get the raw decimal field |
int |
parse(byte[] buf,
int offset)
Parse a byte buffer and store the value |
void |
set(LBMSDMRawDecimal v)
Set the raw decimal. |
java.lang.String |
toDbgString()
Get a string useful for debugging |
java.lang.String |
toString()
Get the string form of the decimal |
| Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMField |
|---|
add_element, append, format_name, format_type, get_name, getType, getType, getTypeString, internalString, isNull, length, name_len, remove, sameBaseType, sameType, set_name, set, setNull, type_len |
| Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM |
|---|
log, set_debug_level |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected LBMSDMRawDecimal internalValue
| Constructor Detail |
|---|
public LBMSDMFieldDecimal(java.lang.String name)
throws LBMSDMException
name - The field name
LBMSDMException
public LBMSDMFieldDecimal(java.lang.String name,
LBMSDMRawDecimal v)
throws LBMSDMException
name - The field namev - The decimal to be used as the field value
LBMSDMException
public LBMSDMFieldDecimal(java.lang.String name,
long mant,
int exp)
throws LBMSDMException
name - The field namemant - The mantissa to be used as the decimalexp - The exponent to be used as the decimal
LBMSDMException
protected LBMSDMFieldDecimal(short type,
java.lang.String name)
type - The field type to be createdname - The name of the field to be created| Method Detail |
|---|
public LBMSDMRawDecimal get()
public static int fixed_size()
public int get_len()
get_len in class LBMSDMFieldpublic final int get_base_len()
public void set(LBMSDMRawDecimal v)
throws LBMSDMException
v - The LBMSDMRawDecimal object to be set - it will be copied
LBMSDMExceptionpublic java.lang.String toDbgString()
toDbgString in class LBMSDMField
public int format(byte[] buf,
int offset)
throws LBMSDMException
format in class LBMSDMFieldbuf - The byte buffer to have the decimal formatted inoffset - The offset to begin formatting in the buffer
LBMSDMException - when an unexpected error occurs within LBMSDMpublic java.lang.String toString()
toString in class java.lang.Object
public int parse(byte[] buf,
int offset)
throws LBMSDMException
parse in class LBMSDMFieldbuf - The byte buffer to be parsed for the decimaloffset - The offset to begin parsing the buffer
LBMSDMException - parse() should be overridden
public LBMSDMFieldDecimal clone()
throws java.lang.CloneNotSupportedException
clone in class LBMSDMFieldjava.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||