E
- the Enum
to translate to/from.public class Struct.Enum8<E extends Enum<E>> extends Struct.EnumField<E>
enumClass
type
Constructor and Description |
---|
Enum8(Class<E> enumClass)
Creates a new 8 bit enum field.
|
Modifier and Type | Method and Description |
---|---|
E |
get()
Gets a java Enum value representing the native integer value.
|
int |
intValue()
Returns an integer representation of this enum field.
|
void |
set(E value)
Sets the native integer value using a java Enum value.
|
void |
set(Number value)
Sets the field to a new value.
|
toString
byteValue, doubleValue, floatValue, getMemory, longValue, offset, shortValue, struct
public final E get()
get
in class Struct.EnumField<E extends Enum<E>>
public final void set(E value)
value
- the java Enum value.public void set(Number value)
Struct.NumberField
set
in class Struct.NumberField
value
- The new value.public final int intValue()
intValue
in class Struct.NumberField
Copyright © 2017. All rights reserved.