Package jnr.ffi.byref
Class DoubleByReference
- java.lang.Object
-
- java.lang.Number
-
- jnr.ffi.byref.AbstractNumberReference<java.lang.Double>
-
- jnr.ffi.byref.DoubleByReference
-
- All Implemented Interfaces:
java.io.Serializable
,ByReference<java.lang.Double>
public final class DoubleByReference extends AbstractNumberReference<java.lang.Double>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleByReference()
Creates a new reference to a double value initialized to zero.DoubleByReference(double value)
Creates a new reference to a double valueDoubleByReference(java.lang.Double value)
Creates a new reference to a double value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromNative(Runtime runtime, Pointer buffer, long offset)
Copies the double value from native memoryint
nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.void
toNative(Runtime runtime, Pointer buffer, long offset)
Copies the double value to native memory-
Methods inherited from class jnr.ffi.byref.AbstractNumberReference
byteValue, checkNull, doubleValue, floatValue, getValue, intValue, longValue, shortValue
-
-
-
-
Constructor Detail
-
DoubleByReference
public DoubleByReference()
Creates a new reference to a double value initialized to zero.
-
DoubleByReference
public DoubleByReference(java.lang.Double value)
Creates a new reference to a double value- Parameters:
value
- the initial native value
-
DoubleByReference
public DoubleByReference(double value)
Creates a new reference to a double value- Parameters:
value
- the initial native value
-
-
Method Detail
-
toNative
public void toNative(Runtime runtime, Pointer buffer, long offset)
Copies the double value to native memory- Parameters:
runtime
- the current runtime.buffer
- the native memory buffer.offset
- the memory offset.
-
fromNative
public void fromNative(Runtime runtime, Pointer buffer, long offset)
Copies the double value from native memory- Parameters:
runtime
- the current runtime.buffer
- the native memory buffer.offset
- the memory offset.
-
nativeSize
public final int nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.- Parameters:
runtime
- the current runtime.- Returns:
- the size of a byte in bytes.
-
-