Record Class TaskQueue.PrioritizedTask

java.lang.Object
java.lang.Record
net.minecraft.util.thread.TaskQueue.PrioritizedTask
Record Components:
priority -
runnable -
All Implemented Interfaces:
Runnable
Enclosing interface:
TaskQueue<T extends Runnable>

public static record TaskQueue.PrioritizedTask(int priority, Runnable runnable) extends Record implements Runnable
Mappings:
Namespace Name
named net/minecraft/util/thread/TaskQueue$PrioritizedTask
intermediary net/minecraft/class_3847$class_3907
official bsc$c
named priority
intermediary comp_3142
official a
named runnable
intermediary comp_3143
official b
  • Field Details

    • priority

      private final int priority
      The field for the priority record component.
    • runnable

      private final Runnable runnable
      The field for the runnable record component.
  • Constructor Details

    • PrioritizedTask

      public PrioritizedTask(int priority, Runnable runnable)
      Creates an instance of a PrioritizedTask record class.
      Parameters:
      priority - the value for the priority record component
      runnable - the value for the runnable record component
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • 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 object)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • runnable

      public Runnable runnable()
      Returns the value of the runnable record component.
      Returns:
      the value of the runnable record component