Record Class UnbakedMutator.Handler<T>

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.generators.blockstate.UnbakedMutator.Handler<T>
Enclosing class:
UnbakedMutator

private static record UnbakedMutator.Handler<T>(Class<T> supportedClass, UnaryOperator<T> operator) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final UnaryOperator<T>
    The field for the operator record component.
    private final Class<T>
    The field for the supportedClass record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Handler(Class<T> supportedClass, UnaryOperator<T> operator)
    Creates an instance of a Handler record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked unbaked)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the operator record component.
    Returns the value of the supportedClass record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • supportedClass

      private final Class<T> supportedClass
      The field for the supportedClass record component.
    • operator

      private final UnaryOperator<T> operator
      The field for the operator record component.
  • Constructor Details

    • Handler

      private Handler(Class<T> supportedClass, UnaryOperator<T> operator)
      Creates an instance of a Handler record class.
      Parameters:
      supportedClass - the value for the supportedClass record component
      operator - the value for the operator record component
  • Method Details

    • apply

      public T apply(net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked unbaked)
    • 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.
    • supportedClass

      public Class<T> supportedClass()
      Returns the value of the supportedClass record component.
      Returns:
      the value of the supportedClass record component
    • operator

      public UnaryOperator<T> operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component