Top Description Fields Constructors Methods
jnr.ffi.byref

public abstract Class AbstractNumberReference<T extends java.lang.Number>

extends Number
implements ByReference<T extends Number>
Class Inheritance
All Implemented Interfaces
jnr.ffi.byref.ByReference
Known Direct Subclasses
jnr.ffi.byref.ByteByReference, jnr.ffi.byref.DoubleByReference, jnr.ffi.byref.FloatByReference, jnr.ffi.byref.IntByReference, jnr.ffi.byref.LongLongByReference, jnr.ffi.byref.NativeLongByReference, jnr.ffi.byref.NumberByReference, jnr.ffi.byref.ShortByReference

An abstract class for common PrimitiveReference functionality

Field Summary

Modifier and TypeField and Description
pack-priv T

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final byte
byteValue()

Overrides java.lang.Number.byteValue.

Returns the value of the specified number as a byte.
protected static <T extends Number> T
checkNull(T value)

public final double
doubleValue()

Implements abstract java.lang.Number.doubleValue.

Returns the value of the specified number as a double.
public final float
floatValue()

Implements abstract java.lang.Number.floatValue.

Returns the value of the specified number as a float.
public T

Returns:

the current value.
getValue
()

Implements jnr.ffi.byref.ByReference.getValue.

Gets the current value the reference points to.
public final int
intValue()

Implements abstract java.lang.Number.intValue.

Returns the value of the specified number as an int.
public final long
longValue()

Implements abstract java.lang.Number.longValue.

Returns the value of the specified number as a long.
public final short
shortValue()

Overrides java.lang.Number.shortValue.

Returns the value of the specified number as a short.

Field Detail

valueback to summary
pack-priv T value

Constructor Detail

AbstractNumberReferenceback to summary
protected AbstractNumberReference(T value)

Method Detail

byteValueback to summary
public final byte byteValue()

Overrides java.lang.Number.byteValue.

Doc from java.lang.Number.byteValue.

Returns the value of the specified number as a byte.

Returns:byte

the numeric value represented by this object after conversion to type byte.

Annotations
@Override
checkNullback to summary
protected static <T extends Number> T checkNull(T value)
doubleValueback to summary
public final double doubleValue()

Implements abstract java.lang.Number.doubleValue.

Doc from java.lang.Number.doubleValue.

Returns the value of the specified number as a double.

Returns:double

the numeric value represented by this object after conversion to type double.

Annotations
@Override
floatValueback to summary
public final float floatValue()

Implements abstract java.lang.Number.floatValue.

Doc from java.lang.Number.floatValue.

Returns the value of the specified number as a float.

Returns:float

the numeric value represented by this object after conversion to type float.

Annotations
@Override
getValueback to summary
public T getValue()

Implements jnr.ffi.byref.ByReference.getValue.

Gets the current value the reference points to.

Returns:T

the current value.

intValueback to summary
public final int intValue()

Implements abstract java.lang.Number.intValue.

Doc from java.lang.Number.intValue.

Returns the value of the specified number as an int.

Returns:int

the numeric value represented by this object after conversion to type int.

longValueback to summary
public final long longValue()

Implements abstract java.lang.Number.longValue.

Doc from java.lang.Number.longValue.

Returns the value of the specified number as a long.

Returns:long

the numeric value represented by this object after conversion to type long.

Annotations
@Override
shortValueback to summary
public final short shortValue()

Overrides java.lang.Number.shortValue.

Doc from java.lang.Number.shortValue.

Returns the value of the specified number as a short.

Returns:short

the numeric value represented by this object after conversion to type short.

Annotations
@Override