Package jnr.ffi
Class StructLayout.Float
java.lang.Object
jnr.ffi.StructLayout.Field
jnr.ffi.StructLayout.NumberField
jnr.ffi.StructLayout.Float
- Enclosing class:
StructLayout
-
Field Summary
Fields inherited from class jnr.ffi.StructLayout.NumberField
type
-
Constructor Summary
ConstructorsConstructorDescriptionFloat()
Float
(StructLayout.Offset offset) Creates a new float field at a specific offset -
Method Summary
Modifier and TypeMethodDescriptionfinal double
doubleValue
(Pointer ptr) Returns anfloat
representation of thisNumber
.final float
floatValue
(Pointer ptr) Returns anfloat
representation of thisNumber
.final float
final int
Returns aint
representation of thisNumber
.final long
Returns along
representation of thisNumber
.final void
void
Sets the field to a new value.final String
Returns a string representation of thisNumber
.Methods inherited from class jnr.ffi.StructLayout.NumberField
byteValue, shortValue
Methods inherited from class jnr.ffi.StructLayout.Field
enclosing, offset
-
Constructor Details
-
Float
public Float() -
Float
Creates a new float field at a specific offset- Parameters:
offset
- The offset within the memory area for this field.
-
-
Method Details
-
get
-
set
-
set
Description copied from class:StructLayout.NumberField
Sets the field to a new value.- Specified by:
set
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.value
- The new value.
-
intValue
Description copied from class:StructLayout.NumberField
Returns aint
representation of thisNumber
.- Specified by:
intValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- a
int
value for thisNumber
.
-
doubleValue
Description copied from class:StructLayout.NumberField
Returns anfloat
representation of thisNumber
.- Overrides:
doubleValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- an
float
value for thisNumber
.
-
floatValue
Description copied from class:StructLayout.NumberField
Returns anfloat
representation of thisNumber
.- Overrides:
floatValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- an
float
value for thisNumber
.
-
longValue
Description copied from class:StructLayout.NumberField
Returns along
representation of thisNumber
.- Overrides:
longValue
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- a
long
value for thisNumber
.
-
toString
Description copied from class:StructLayout.NumberField
Returns a string representation of thisNumber
.- Overrides:
toString
in classStructLayout.NumberField
- Parameters:
ptr
- The pointer to the field.- Returns:
- a string representation of this
Number
.
-