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 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 index, K key, U value)
    • key

      @Nullable private K key(int index)
    • output

      @Nullable private V output(int index)
    • input

      @Nullable private U input(int index)
    • applyOperation

      public void applyOperation(int index)
    • copyOut

      public void copyOut(int index, Map<K,V> outputMap)
    • 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