Record Class PreeditEvent

java.lang.Object
java.lang.Record
net.minecraft.client.input.PreeditEvent

public record PreeditEvent(String fullText, int caretPosition, List<String> blocks, int focusedBlock) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<String>
    The field for the blocks record component.
    private final int
    The field for the caretPosition record component.
    private final int
    The field for the focusedBlock record component.
    private final String
    The field for the fullText record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PreeditEvent(String fullText, int caretPosition, List<String> blocks, int focusedBlock)
    Creates an instance of a PreeditEvent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the blocks record component.
    int
    Returns the value of the caretPosition record component.
    static @Nullable PreeditEvent
    createFromCallback(int preeditSize, long preeditPtr, int blockCount, long blockSizesPtr, int focusedBlock, int caret)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the focusedBlock record component.
    Returns the value of the fullText record component.
    final int
    Returns a hash code value for this object.
    private static int[]
    readIntBuffer(int size, long ptr)
     
    toFormattedText(Style focusedStyle)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • fullText

      private final String fullText
      The field for the fullText record component.
    • caretPosition

      private final int caretPosition
      The field for the caretPosition record component.
    • blocks

      private final List<String> blocks
      The field for the blocks record component.
    • focusedBlock

      private final int focusedBlock
      The field for the focusedBlock record component.
  • Constructor Details

    • PreeditEvent

      public PreeditEvent(String fullText, int caretPosition, List<String> blocks, int focusedBlock)
      Creates an instance of a PreeditEvent record class.
      Parameters:
      fullText - the value for the fullText record component
      caretPosition - the value for the caretPosition record component
      blocks - the value for the blocks record component
      focusedBlock - the value for the focusedBlock record 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

      public MutableComponent toFormattedText(Style focusedStyle)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fullText

      public String fullText()
      Returns the value of the fullText record component.
      Returns:
      the value of the fullText record component
    • caretPosition

      public int caretPosition()
      Returns the value of the caretPosition record component.
      Returns:
      the value of the caretPosition record component
    • blocks

      public List<String> blocks()
      Returns the value of the blocks record component.
      Returns:
      the value of the blocks record component
    • focusedBlock

      public int focusedBlock()
      Returns the value of the focusedBlock record component.
      Returns:
      the value of the focusedBlock record component