Package jnr.ffi
Class Struct.Enum16<E extends java.lang.Enum<E>>
- java.lang.Object
-
- jnr.ffi.Struct.Member
-
- jnr.ffi.Struct.NumberField
-
- jnr.ffi.Struct.EnumField<E>
-
- jnr.ffi.Struct.Enum16<E>
-
- Enclosing class:
- Struct
public class Struct.Enum16<E extends java.lang.Enum<E>> extends Struct.EnumField<E>
-
-
Field Summary
-
Fields inherited from class jnr.ffi.Struct.EnumField
enumClass
-
Fields inherited from class jnr.ffi.Struct.NumberField
type
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
get()
Gets a java Enum value representing the native integer value.int
intValue()
Returns aint
representation of thisNumber
.void
set(E value)
void
set(java.lang.Number value)
Sets the field to a new value.-
Methods inherited from class jnr.ffi.Struct.EnumField
toString
-
Methods inherited from class jnr.ffi.Struct.NumberField
byteValue, doubleValue, floatValue, getMemory, longValue, offset, shortValue, struct
-
-
-
-
Constructor Detail
-
Enum16
public Enum16(java.lang.Class<E> enumClass)
-
-
Method Detail
-
get
public final E get()
Description copied from class:Struct.EnumField
Gets a java Enum value representing the native integer value.- Specified by:
get
in classStruct.EnumField<E extends java.lang.Enum<E>>
- Returns:
- a java Enum value.
-
set
public final void set(E value)
-
set
public void set(java.lang.Number value)
Description copied from class:Struct.NumberField
Sets the field to a new value.- Specified by:
set
in classStruct.NumberField
- Parameters:
value
- The new value.
-
intValue
public final int intValue()
Description copied from class:Struct.NumberField
Returns aint
representation of thisNumber
.- Specified by:
intValue
in classStruct.NumberField
- Returns:
- a
int
value for thisNumber
.
-
-