public abstract class Struct.NumberField extends Struct.Member
| Modifier and Type | Field and Description |
|---|---|
private int |
offset
Offset from the start of the Struct memory this field is located at.
|
protected Type |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
NumberField(NativeType type) |
protected |
NumberField(NativeType type,
Struct.Offset offset) |
protected |
NumberField(TypeAlias type) |
protected |
NumberField(TypeAlias type,
Struct.Offset offset) |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue()
Returns a
byte representation of this Number. |
double |
doubleValue()
Returns an
float representation of this Number. |
float |
floatValue()
Returns an
float representation of this Number. |
Pointer |
getMemory()
Gets the memory object used to store this
Member |
abstract int |
intValue()
Returns a
int representation of this Number. |
long |
longValue()
Returns a
long representation of this Number. |
long |
offset()
Gets the offset within the structure for this field.
|
abstract void |
set(java.lang.Number value)
Sets the field to a new value.
|
short |
shortValue()
Returns a
short representation of this Number. |
Struct |
struct()
Gets the Struct this Member is in.
|
java.lang.String |
toString()
Returns a string representation of this
Number. |
private final int offset
protected final Type type
protected NumberField(NativeType type)
protected NumberField(NativeType type, Struct.Offset offset)
protected NumberField(TypeAlias type)
protected NumberField(TypeAlias type, Struct.Offset offset)
public final Pointer getMemory()
Struct.MemberMembergetMemory in class Struct.MemberPointerpublic final Struct struct()
struct in class Struct.Memberpublic final long offset()
offset in class Struct.Memberpublic abstract void set(java.lang.Number value)
value - The new value.public double doubleValue()
float representation of this Number.float value for this Number.public float floatValue()
float representation of this Number.float value for this Number.public byte byteValue()
byte representation of this Number.byte value for this Number.public short shortValue()
short representation of this Number.short value for this Number.public abstract int intValue()
int representation of this Number.int value for this Number.public long longValue()
long representation of this Number.long value for this Number.public java.lang.String toString()
Number.toString in class java.lang.ObjectNumber.