Record Class Mapping.Boolean
java.lang.Object
java.lang.Record
org.lwjgl.system.ffm.mapping.Mapping.Boolean
- All Implemented Interfaces:
DataMapping<ValueLayout.OfBoolean>, Mapping<ValueLayout.OfBoolean>, PrimitiveMapping<ValueLayout.OfBoolean>
- Enclosing interface:
Mapping<L extends MemoryLayout>
public static record Mapping.Boolean(ValueLayout.OfBoolean layout, Mapping.Pointer p)
extends Record
implements PrimitiveMapping<ValueLayout.OfBoolean>
Mapping from
ValueLayout.JAVA_BOOLEAN to C bool.-
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
ConstructorsConstructorDescriptionBoolean(ValueLayout.OfBoolean layout, Mapping.Pointer p) Creates an instance of aBooleanrecord 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.booleanget(MemorySegment segment, long offset) booleangetAtIndex(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, boolean value) setAtIndex(MemorySegment segment, long index, boolean 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
-
Boolean
Creates an instance of aBooleanrecord class.- Parameters:
layout- the value for thelayoutrecord componentp- the value for theprecord component
-
Boolean
-
-
Method Details
-
withByteAlignment
Description copied from interface:DataMappingReturns a copy of this mapping with the specified byte alignment.- Specified by:
withByteAlignmentin interfaceDataMapping<ValueLayout.OfBoolean>- Specified by:
withByteAlignmentin interfacePrimitiveMapping<ValueLayout.OfBoolean>- 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.OfBoolean>- Specified by:
typedefin interfacePrimitiveMapping<ValueLayout.OfBoolean>- Returns:
- the new mapping
-
cconst
Description copied from interface:MappingCreates a new instance of this mapping with the Cconstqualifier- Specified by:
cconstin interfaceMapping<ValueLayout.OfBoolean>- Returns:
- the new mapping
-
get
-
getAtIndex
-
set
-
setAtIndex
-
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.OfBoolean>- Returns:
- the value of the
layoutrecord component
-
p
Returns the value of theprecord component.- Specified by:
pin interfaceMapping<ValueLayout.OfBoolean>- Returns:
- the value of the
precord component
-