Record Class PreeditEvent
java.lang.Object
java.lang.Record
net.minecraft.client.input.PreeditEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theblocksrecord component.private final intThe field for thecaretPositionrecord component.private final intThe field for thefocusedBlockrecord component.private final StringThe field for thefullTextrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPreeditEvent(String fullText, int caretPosition, List<String> blocks, int focusedBlock) Creates an instance of aPreeditEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.intReturns the value of thecaretPositionrecord component.static @Nullable PreeditEventcreateFromCallback(int preeditSize, long preeditPtr, int blockCount, long blockSizesPtr, int focusedBlock, int caret) final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefocusedBlockrecord component.fullText()Returns the value of thefullTextrecord component.final inthashCode()Returns a hash code value for this object.private static int[]readIntBuffer(int size, long ptr) toFormattedText(Style focusedStyle) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fullText
The field for thefullTextrecord component. -
caretPosition
private final int caretPositionThe field for thecaretPositionrecord component. -
blocks
-
focusedBlock
private final int focusedBlockThe field for thefocusedBlockrecord component.
-
-
Constructor Details
-
PreeditEvent
Creates an instance of aPreeditEventrecord class.- Parameters:
fullText- the value for thefullTextrecord componentcaretPosition- the value for thecaretPositionrecord componentblocks- the value for theblocksrecord componentfocusedBlock- the value for thefocusedBlockrecord component
-
-
Method Details
-
createFromCallback
public static @Nullable PreeditEvent createFromCallback(int preeditSize, long preeditPtr, int blockCount, long blockSizesPtr, int focusedBlock, int caret) -
readIntBuffer
private static int[] readIntBuffer(int size, long ptr) -
toFormattedText
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
fullText
Returns the value of thefullTextrecord component.- Returns:
- the value of the
fullTextrecord component
-
caretPosition
public int caretPosition()Returns the value of thecaretPositionrecord component.- Returns:
- the value of the
caretPositionrecord component
-
blocks
-
focusedBlock
public int focusedBlock()Returns the value of thefocusedBlockrecord component.- Returns:
- the value of the
focusedBlockrecord component
-