Package jnr.ffi
Class Struct.Float
- java.lang.Object
-
- jnr.ffi.Struct.Member
-
- jnr.ffi.Struct.NumberField
-
- jnr.ffi.Struct.Float
-
- Enclosing class:
- Struct
public class Struct.Float extends Struct.NumberField
-
-
Field Summary
-
Fields inherited from class jnr.ffi.Struct.NumberField
type
-
-
Constructor Summary
Constructors Constructor Description Float()
Float(Struct.Offset offset)
Creates a new float field at a specific offset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue()
Returns anfloat
representation of thisNumber
.float
floatValue()
Returns anfloat
representation of thisNumber
.float
get()
int
intValue()
Returns aint
representation of thisNumber
.long
longValue()
Returns along
representation of thisNumber
.void
set(float value)
void
set(java.lang.Number value)
Sets the field to a new value.java.lang.String
toString()
Returns a string representation of thisNumber
.-
Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, getMemory, offset, shortValue, struct
-
-
-
-
Constructor Detail
-
Float
public Float()
-
Float
public Float(Struct.Offset offset)
Creates a new float field at a specific offset- Parameters:
offset
- The offset within the memory area for this field.
-
-
Method Detail
-
get
public final float get()
-
set
public final void set(float value)
-
set
public void set(java.lang.Number value)
Description copied from class:Struct.NumberField
Sets the field to a new value.- Specified by:
set
in classStruct.NumberField
- Parameters:
value
- The new value.
-
intValue
public final int intValue()
Description copied from class:Struct.NumberField
Returns aint
representation of thisNumber
.- Specified by:
intValue
in classStruct.NumberField
- Returns:
- a
int
value for thisNumber
.
-
doubleValue
public final double doubleValue()
Description copied from class:Struct.NumberField
Returns anfloat
representation of thisNumber
.- Overrides:
doubleValue
in classStruct.NumberField
- Returns:
- an
float
value for thisNumber
.
-
floatValue
public final float floatValue()
Description copied from class:Struct.NumberField
Returns anfloat
representation of thisNumber
.- Overrides:
floatValue
in classStruct.NumberField
- Returns:
- an
float
value for thisNumber
.
-
longValue
public final long longValue()
Description copied from class:Struct.NumberField
Returns along
representation of thisNumber
.- Overrides:
longValue
in classStruct.NumberField
- Returns:
- a
long
value for thisNumber
.
-
toString
public final java.lang.String toString()
Description copied from class:Struct.NumberField
Returns a string representation of thisNumber
.- Overrides:
toString
in classStruct.NumberField
- Returns:
- a string representation of this
Number
.
-
-