Record Class Mapping.Float
java.lang.Object
java.lang.Record
org.lwjgl.system.ffm.mapping.Mapping.Float
- All Implemented Interfaces:
DataMapping<ValueLayout.OfFloat>, Mapping<ValueLayout.OfFloat>, PrimitiveMapping<ValueLayout.OfFloat>
- Enclosing interface:
Mapping<L extends MemoryLayout>
public static record Mapping.Float(ValueLayout.OfFloat layout, Mapping.Pointer p)
extends Record
implements PrimitiveMapping<ValueLayout.OfFloat>
Mapping from
ValueLayout.JAVA_FLOAT to C float.-
Nested Class Summary
Nested classes/interfaces inherited from interface Mapping
Mapping.Boolean, Mapping.Byte, Mapping.Char, Mapping.CLong, Mapping.Double, Mapping.Float, Mapping.Int, Mapping.Long, Mapping.Opaque, Mapping.Pointer, Mapping.Sequence, Mapping.Short, Mapping.Size, Mapping.Struct, Mapping.Union -
Constructor Summary
ConstructorsConstructorDescriptionFloat(ValueLayout.OfFloat layout, Mapping.Pointer p) Creates an instance of aFloatrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncconst()Creates a new instance of this mapping with the Cconstqualifierfinal booleanIndicates whether some other object is "equal to" this one.floatget(MemorySegment segment, long offset) floatgetAligned(MemorySegment segment, long offset) floatgetAtIndex(MemorySegment segment, long index) floatgetAtIndexAligned(MemorySegment segment, long index) final inthashCode()Returns a hash code value for this object.layout()Returns the value of thelayoutrecord component.p()Returns the value of theprecord component.set(MemorySegment segment, long offset, float value) setAligned(MemorySegment segment, long offset, float value) setAtIndex(MemorySegment segment, long index, float value) setAtIndexAligned(MemorySegment segment, long index, float value) final StringtoString()Returns a string representation of this record class.Creates a new instance of this mapping with the specified type name.withByteAlignment(long byteAlignment) Returns a copy of this mapping with the specified byte alignment.Methods inherited from interface DataMapping
allocateSegment, allocateSegment, allocateSegment, allocateSegment, array, mallocSegment, mallocSegment
-
Constructor Details
-
Float
Creates an instance of aFloatrecord class.- Parameters:
layout- the value for thelayoutrecord componentp- the value for theprecord component
-
-
Method Details
-
withByteAlignment
Description copied from interface:DataMappingReturns a copy of this mapping with the specified byte alignment.- Specified by:
withByteAlignmentin interfaceDataMapping<ValueLayout.OfFloat>- Specified by:
withByteAlignmentin interfacePrimitiveMapping<ValueLayout.OfFloat>- Parameters:
byteAlignment- the new byte alignment- Returns:
- the new mapping
-
typedef
Description copied from interface:MappingCreates a new instance of this mapping with the specified type name.- Specified by:
typedefin interfaceMapping<ValueLayout.OfFloat>- Specified by:
typedefin interfacePrimitiveMapping<ValueLayout.OfFloat>- Returns:
- the new mapping
-
cconst
Description copied from interface:MappingCreates a new instance of this mapping with the Cconstqualifier- Specified by:
cconstin interfaceMapping<ValueLayout.OfFloat>- Returns:
- the new mapping
-
get
-
getAligned
-
getAtIndex
-
getAtIndexAligned
-
set
-
setAligned
-
setAtIndex
-
setAtIndexAligned
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
layout
Returns the value of thelayoutrecord component.- Specified by:
layoutin interfaceMapping<ValueLayout.OfFloat>- Returns:
- the value of the
layoutrecord component
-
p
Returns the value of theprecord component.- Specified by:
pin interfaceMapping<ValueLayout.OfFloat>- Returns:
- the value of the
precord component
-