|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jniwrapper.Parameter
|
+--com.jniwrapper.AbstractFloat
Base class for all floating point types.
| Constructor Summary | |
protected |
AbstractFloat(double val,
int length)
Constructs a floating point object with specified value and the length equal to its native length in bytes. |
| Method Summary | |
protected abstract byte[] |
convertToBytes(double d)
Converts Java double value to its native representation |
protected abstract double |
convertToDouble(byte[] bytes)
Converts native representation of a floating point value to Java double value |
int |
getLength()
Returns a length of the parameter in memory. |
double |
getValue()
Returns floating point value of object instance |
void |
read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Reads this parameter from a specified data source. |
void |
setValue(double d)
Sets floating point value to specified value |
java.lang.String |
toString()
|
void |
write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
Writes this parameter to a specified data source. |
| Methods inherited from class com.jniwrapper.Parameter |
acceptIOPerformer, asReturnValue, clone, equals, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected AbstractFloat(double val,
int length)
| Method Detail |
public int getLength()
Parametersizeof() operator.
getLength in class Parameter
public void write(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
throws MemoryAccessViolationException
Parameter
write in class ParameterMemoryAccessViolationException
public void read(DataBuffer stackBuffer,
int offset,
boolean invokedByCallback)
throws MemoryAccessViolationException
Parameter
read in class ParameterMemoryAccessViolationExceptionpublic double getValue()
FloatParameter
getValue in interface FloatParameterprotected abstract double convertToDouble(byte[] bytes)
double value
protected abstract byte[] convertToBytes(double d)
double value to its native representation
public void setValue(double d)
FloatParameter
setValue in interface FloatParameterpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||