public class StructLayout.Signed16 extends StructLayout.NumberField
type
Constructor and Description |
---|
Signed16()
Creates a new 16 bit integer field.
|
Signed16(StructLayout.Offset offset)
Creates a new 16 bit signed integer field at a specific offset
|
Modifier and Type | Method and Description |
---|---|
short |
get(Pointer ptr)
Gets the value for this field.
|
int |
intValue(Pointer ptr)
Returns a java int representation of this field.
|
void |
set(Pointer ptr,
Number value)
Sets the field to a new value.
|
void |
set(Pointer ptr,
short value)
Sets the value for this field.
|
short |
shortValue(Pointer ptr)
Returns a java short representation of this field.
|
byteValue, doubleValue, floatValue, longValue, toString
enclosing, offset
public Signed16()
public Signed16(StructLayout.Offset offset)
offset
- The offset within the memory area for this field.public final short get(Pointer ptr)
ptr
- The pointer to the field.public final void set(Pointer ptr, short value)
ptr
- The pointer to the field.value
- the 16 bit value to set.public void set(Pointer ptr, Number value)
StructLayout.NumberField
set
in class StructLayout.NumberField
ptr
- The pointer to the field.value
- The new value.public final short shortValue(Pointer ptr)
shortValue
in class StructLayout.NumberField
ptr
- The pointer to the field.public final int intValue(Pointer ptr)
intValue
in class StructLayout.NumberField
ptr
- The pointer to the field.Copyright © 2017. All rights reserved.