Record Class RewriteResult<A,B>

java.lang.Object
java.lang.Record
com.mojang.datafixers.RewriteResult<A,B>

public record RewriteResult<A,B>(View<A,B> view, BitSet recData) extends Record
  • Constructor Details

    • RewriteResult

      public RewriteResult(View<A,B> view, BitSet recData)
      Creates an instance of a RewriteResult record class.
      Parameters:
      view - the value for the view record component
      recData - the value for the recData record component
  • Method Details

    • create

      public static <A, B> RewriteResult<A,B> create(View<A,B> view, BitSet recData)
    • nop

      public static <A> RewriteResult<A,A> nop(Type<A> type)
    • compose

      public <C> RewriteResult<C,B> compose(RewriteResult<C,A> that)
    • toString

      public 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
    • equals

      public 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.
    • hashCode

      public 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
    • view

      public View<A,B> view()
      Returns the value of the view record component.
      Returns:
      the value of the view record component
    • recData

      public BitSet recData()
      Returns the value of the recData record component.
      Returns:
      the value of the recData record component