Package jnr.ffi.byref
Class AbstractNumberReference<T extends Number>
- java.lang.Object
-
- java.lang.Number
-
- jnr.ffi.byref.AbstractNumberReference<T>
-
- All Implemented Interfaces:
Serializable
,ByReference<T>
- Direct Known Subclasses:
ByteByReference
,DoubleByReference
,FloatByReference
,IntByReference
,LongLongByReference
,NativeLongByReference
,NumberByReference
,ShortByReference
public abstract class AbstractNumberReference<T extends Number> extends Number implements ByReference<T>
An abstract class for common PrimitiveReference functionality- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNumberReference(T value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
byteValue()
protected static <T extends Number>
TcheckNull(T value)
double
doubleValue()
float
floatValue()
T
getValue()
Gets the current value the reference points to.int
intValue()
long
longValue()
short
shortValue()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jnr.ffi.byref.ByReference
fromNative, nativeSize, toNative
-
-
-
-
Constructor Detail
-
AbstractNumberReference
protected AbstractNumberReference(T value)
-
-
Method Detail
-
checkNull
protected static <T extends Number> T checkNull(T value)
-
getValue
public T getValue()
Gets the current value the reference points to.- Specified by:
getValue
in interfaceByReference<T extends Number>
- Returns:
- the current value.
-
shortValue
public final short shortValue()
- Overrides:
shortValue
in classNumber
-
floatValue
public final float floatValue()
- Specified by:
floatValue
in classNumber
-
doubleValue
public final double doubleValue()
- Specified by:
doubleValue
in classNumber
-
-