Record Class Mapping.Char
java.lang.Object
java.lang.Record
org.lwjgl.system.ffm.mapping.Mapping.Char
- All Implemented Interfaces:
DataMapping<ValueLayout.OfChar>, IntegerMapping<ValueLayout.OfChar>, Mapping<ValueLayout.OfChar>, PrimitiveMapping<ValueLayout.OfChar>
- Enclosing interface:
Mapping<L extends MemoryLayout>
public static record Mapping.Char(ValueLayout.OfChar layout, Mapping.Pointer p)
extends Record
implements IntegerMapping<ValueLayout.OfChar>
Mapping from
ValueLayout.JAVA_CHAR to C uint16_t.-
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
ConstructorsConstructorDescriptionChar(ValueLayout.OfChar layout, Mapping.Pointer p) Creates an instance of aCharrecord 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.charget(MemorySegment segment, long offset) chargetAligned(MemorySegment segment, long offset) chargetAtIndex(MemorySegment segment, long index) chargetAtIndexAligned(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, char value) setAligned(MemorySegment segment, long offset, char value) setAtIndex(MemorySegment segment, long index, char value) setAtIndexAligned(MemorySegment segment, long index, char value) booleansigned()Returns whether the integer is signed (true) or unsigned (false).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
-
Char
Creates an instance of aCharrecord class.- Parameters:
layout- the value for thelayoutrecord componentp- the value for theprecord component
-
-
Method Details
-
signed
public boolean signed()Description copied from interface:IntegerMappingReturns whether the integer is signed (true) or unsigned (false).- Specified by:
signedin interfaceIntegerMapping<ValueLayout.OfChar>- Returns:
- whether the integer is signed
-
withByteAlignment
Description copied from interface:DataMappingReturns a copy of this mapping with the specified byte alignment.- Specified by:
withByteAlignmentin interfaceDataMapping<ValueLayout.OfChar>- Specified by:
withByteAlignmentin interfacePrimitiveMapping<ValueLayout.OfChar>- 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 interfaceIntegerMapping<ValueLayout.OfChar>- Specified by:
typedefin interfaceMapping<ValueLayout.OfChar>- Specified by:
typedefin interfacePrimitiveMapping<ValueLayout.OfChar>- Returns:
- the new mapping
-
cconst
Description copied from interface:MappingCreates a new instance of this mapping with the Cconstqualifier- Specified by:
cconstin interfaceMapping<ValueLayout.OfChar>- Returns:
- the new mapping
-
get
-
getAtIndex
-
getAligned
-
getAtIndexAligned
-
set
-
setAtIndex
-
setAligned
-
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.OfChar>- Returns:
- the value of the
layoutrecord component
-
p
Returns the value of theprecord component.- Specified by:
pin interfaceMapping<ValueLayout.OfChar>- Returns:
- the value of the
precord component
-