Package jnr.ffi
Class Struct.Float
java.lang.Object
jnr.ffi.Struct.Member
jnr.ffi.Struct.NumberField
jnr.ffi.Struct.Float
- Enclosing class:
- Struct
-
Field Summary
Fields inherited from class jnr.ffi.Struct.NumberField
type -
Constructor Summary
ConstructorsConstructorDescriptionFloat()Float(Struct.Offset offset) Creates a new float field at a specific offset -
Method Summary
Modifier and TypeMethodDescriptionfinal doubleReturns anfloatrepresentation of thisNumber.final floatReturns anfloatrepresentation of thisNumber.final floatget()final intintValue()Returns aintrepresentation of thisNumber.final longReturns alongrepresentation of thisNumber.final voidset(float value) voidSets the field to a new value.final StringtoString()Returns a string representation of thisNumber.Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, getMemory, offset, shortValue, struct
-
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
public final float get() -
set
public final void set(float value) -
set
Description copied from class:Struct.NumberFieldSets the field to a new value.- Specified by:
setin classStruct.NumberField- Parameters:
value- The new value.
-
intValue
public final int intValue()Description copied from class:Struct.NumberFieldReturns aintrepresentation of thisNumber.- Specified by:
intValuein classStruct.NumberField- Returns:
- a
intvalue for thisNumber.
-
doubleValue
public final double doubleValue()Description copied from class:Struct.NumberFieldReturns anfloatrepresentation of thisNumber.- Overrides:
doubleValuein classStruct.NumberField- Returns:
- an
floatvalue for thisNumber.
-
floatValue
public final float floatValue()Description copied from class:Struct.NumberFieldReturns anfloatrepresentation of thisNumber.- Overrides:
floatValuein classStruct.NumberField- Returns:
- an
floatvalue for thisNumber.
-
longValue
public final long longValue()Description copied from class:Struct.NumberFieldReturns alongrepresentation of thisNumber.- Overrides:
longValuein classStruct.NumberField- Returns:
- a
longvalue for thisNumber.
-
toString
Description copied from class:Struct.NumberFieldReturns a string representation of thisNumber.- Overrides:
toStringin classStruct.NumberField- Returns:
- a string representation of this
Number.
-