Record Class ParallelMapTransform.Container<K,U,V>

java.lang.Object
java.lang.Record
net.minecraft.util.thread.ParallelMapTransform.Container<K,U,V>
Enclosing class:
ParallelMapTransform

static record ParallelMapTransform.Container<K,U,V>(BiFunction<K,U,V> operation, Object[] keys, Object[] values) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Object[]
    The field for the keys record component.
    private final BiFunction<K,U,V>
    The field for the operation record component.
    private final Object[]
    The field for the values record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Container(BiFunction<K,U,V> p_405815_, int p_405453_)
     
    Container(BiFunction<K,U,V> operation, Object[] keys, Object[] values)
    Creates an instance of a Container record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyOperation(int p_404789_)
     
    void
    copyOut(int p_405686_, Map<K,V> p_405566_)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    private U
    input(int p_405264_)
     
    private K
    key(int p_404792_)
     
    Returns the value of the keys record component.
    Returns the value of the operation record component.
    private V
    output(int p_405132_)
     
    void
    put(int p_404987_, K p_404805_, U p_405660_)
     
    int
     
    final String
    Returns a string representation of this record class.
    Returns the value of the values record component.

    Methods inherited from class java.lang.Object

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

    • operation

      private final BiFunction<K,U,V> operation
      The field for the operation record component.
    • keys

      private final Object[] keys
      The field for the keys record component.
    • values

      private final Object[] values
      The field for the values record component.
  • Constructor Details

    • Container

      public Container(BiFunction<K,U,V> p_405815_, int p_405453_)
    • Container

      Container(BiFunction<K,U,V> operation, Object[] keys, Object[] values)
      Creates an instance of a Container record class.
      Parameters:
      operation - the value for the operation record component
      keys - the value for the keys record component
      values - the value for the values record component
  • Method Details

    • put

      public void put(int p_404987_, K p_404805_, U p_405660_)
    • key

      @Nullable private K key(int p_404792_)
    • output

      @Nullable private V output(int p_405132_)
    • input

      @Nullable private U input(int p_405264_)
    • applyOperation

      public void applyOperation(int p_404789_)
    • copyOut

      public void copyOut(int p_405686_, Map<K,V> p_405566_)
    • size

      public int size()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • operation

      public BiFunction<K,U,V> operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component
    • keys

      public Object[] keys()
      Returns the value of the keys record component.
      Returns:
      the value of the keys record component
    • values

      public Object[] values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component