com.kenai.jaffl.struct
Class Struct.Enum8<E extends Enum<E>>
java.lang.Object
java.lang.Number
com.kenai.jaffl.struct.Struct.NumberField
com.kenai.jaffl.struct.Struct.EnumField<E>
com.kenai.jaffl.struct.Struct.Enum8<E>
- Type Parameters:
E
- the Enum
to translate to/from.
- All Implemented Interfaces:
- Struct.Member, Serializable
- Enclosing class:
- Struct
public class Struct.Enum8<E extends Enum<E>>
- extends Struct.EnumField<E>
An 8 bit enum field.
- See Also:
- Serialized Form
Method Summary |
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. |
Struct.Enum8
public Struct.Enum8(Class<E> enumClass)
- Creates a new 8 bit enum field.
- Parameters:
enumClass
- the class of the Enum
.
get
public final E get()
- Gets a java Enum value representing the native integer value.
- Specified by:
get
in class Struct.EnumField<E extends Enum<E>>
- Returns:
- a java Enum value.
set
public final void set(E value)
- Sets the native integer value using a java Enum value.
- Parameters:
value
- the java Enum value.
set
public void set(Number value)
- Description copied from class:
Struct.NumberField
- Sets the field to a new value.
- Specified by:
set
in class Struct.NumberField
- Parameters:
value
- The new value.
intValue
public final int intValue()
- Returns an integer representation of this enum field.
- Specified by:
intValue
in class Number
- Returns:
- an integer value for this enum field.
Copyright © 2011. All Rights Reserved.