Class StructLayout.NumberField
java.lang.Object
jnr.ffi.StructLayout.Field
jnr.ffi.StructLayout.NumberField
- Direct Known Subclasses:
StructLayout.Double, StructLayout.EnumField, StructLayout.Float, StructLayout.IntegerAlias, StructLayout.Pointer, StructLayout.Signed16, StructLayout.Signed32, StructLayout.Signed64, StructLayout.Signed8, StructLayout.SignedLong, StructLayout.Unsigned16, StructLayout.Unsigned32, StructLayout.Unsigned64, StructLayout.Unsigned8, StructLayout.UnsignedLong
- Enclosing class:
StructLayout
Base class for all Number structure fields.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNumberField(NativeType nativeType) protectedNumberField(NativeType nativeType, StructLayout.Offset offset) protectedNumberField(Type type) protectedNumberField(Type type, StructLayout.Offset offset) -
Method Summary
Modifier and TypeMethodDescriptionbyteReturns abyterepresentation of thisNumber.doubledoubleValue(Pointer ptr) Returns anfloatrepresentation of thisNumber.floatfloatValue(Pointer ptr) Returns anfloatrepresentation of thisNumber.abstract intReturns aintrepresentation of thisNumber.longReturns alongrepresentation of thisNumber.abstract voidSets the field to a new value.shortshortValue(Pointer ptr) Returns ashortrepresentation of thisNumber.Returns a string representation of thisNumber.Methods inherited from class StructLayout.Field
enclosing, offset
-
Field Details
-
type
-
-
Constructor Details
-
NumberField
-
NumberField
-
NumberField
-
NumberField
-
-
Method Details
-
set
-
doubleValue
Returns anfloatrepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- an
floatvalue for thisNumber.
-
floatValue
Returns anfloatrepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- an
floatvalue for thisNumber.
-
byteValue
Returns abyterepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- a
bytevalue for thisNumber.
-
shortValue
Returns ashortrepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- a
shortvalue for thisNumber.
-
intValue
Returns aintrepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- a
intvalue for thisNumber.
-
longValue
Returns alongrepresentation of thisNumber.- Parameters:
ptr- The pointer to the field.- Returns:
- a
longvalue for thisNumber.
-
toString
-