- java.lang.Object
-
- jnr.ffi.StructLayout.Field
-
- jnr.ffi.StructLayout.NumberField
-
- jnr.ffi.StructLayout.Float
-
- Enclosing class:
- StructLayout
public class StructLayout.Float extends StructLayout.NumberField
-
-
Field Summary
-
Fields inherited from class jnr.ffi.StructLayout.NumberField
type
-
-
Constructor Summary
Constructors Constructor Description Float()Float(StructLayout.Offset offset)Creates a new float field at a specific offset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledoubleValue(Pointer ptr)Returns anfloatrepresentation of thisNumber.floatfloatValue(Pointer ptr)Returns anfloatrepresentation of thisNumber.floatget(Pointer ptr)intintValue(Pointer ptr)Returns aintrepresentation of thisNumber.longlongValue(Pointer ptr)Returns alongrepresentation of thisNumber.voidset(Pointer ptr, float value)voidset(Pointer ptr, Number value)Sets the field to a new value.StringtoString(Pointer ptr)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 Detail
-
Float
public Float()
-
Float
public Float(StructLayout.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(Pointer ptr)
-
set
public final void set(Pointer ptr, float value)
-
set
public void set(Pointer ptr, Number value)
Description copied from class:StructLayout.NumberFieldSets the field to a new value.- Specified by:
setin classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.value- The new value.
-
intValue
public final int intValue(Pointer ptr)
Description copied from class:StructLayout.NumberFieldReturns aintrepresentation of thisNumber.- Specified by:
intValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- a
intvalue for thisNumber.
-
doubleValue
public final double doubleValue(Pointer ptr)
Description copied from class:StructLayout.NumberFieldReturns anfloatrepresentation of thisNumber.- Overrides:
doubleValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- an
floatvalue for thisNumber.
-
floatValue
public final float floatValue(Pointer ptr)
Description copied from class:StructLayout.NumberFieldReturns anfloatrepresentation of thisNumber.- Overrides:
floatValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- an
floatvalue for thisNumber.
-
longValue
public final long longValue(Pointer ptr)
Description copied from class:StructLayout.NumberFieldReturns alongrepresentation of thisNumber.- Overrides:
longValuein classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- a
longvalue for thisNumber.
-
toString
public final String toString(Pointer ptr)
Description copied from class:StructLayout.NumberFieldReturns a string representation of thisNumber.- Overrides:
toStringin classStructLayout.NumberField- Parameters:
ptr- The pointer to the field.- Returns:
- a string representation of this
Number.
-
-