Package jnr.ffi
Class StructLayout.Double
- java.lang.Object
-
- jnr.ffi.StructLayout.Field
-
- jnr.ffi.StructLayout.NumberField
-
- jnr.ffi.StructLayout.Double
-
- Enclosing class:
- StructLayout
public final class StructLayout.Double extends StructLayout.NumberField
-
-
Field Summary
-
Fields inherited from class jnr.ffi.StructLayout.NumberField
type
-
-
Constructor Summary
Constructors Constructor Description Double()
Double(StructLayout.Offset offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue(Pointer ptr)
Returns anfloat
representation of thisNumber
.float
floatValue(Pointer ptr)
Returns anfloat
representation of thisNumber
.double
get(Pointer ptr)
int
intValue(Pointer ptr)
Returns aint
representation of thisNumber
.long
longValue(Pointer ptr)
Returns along
representation of thisNumber
.void
set(Pointer ptr, double value)
void
set(Pointer ptr, java.lang.Number value)
Sets the field to a new value.java.lang.String
toString(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
-
Double
public Double()
-
Double
public Double(StructLayout.Offset offset)
-
-
Method Detail
-
get
public final double get(Pointer ptr)
-
set
public final void set(Pointer ptr, double value)
-
set
public void set(Pointer ptr, java.lang.Number value)
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
public final int intValue(Pointer ptr)
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
.
-
longValue
public final long longValue(Pointer ptr)
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
.
-
floatValue
public final float floatValue(Pointer ptr)
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
.
-
doubleValue
public final double doubleValue(Pointer ptr)
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
.
-
toString
public final java.lang.String toString(Pointer ptr)
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
.
-
-