Record Class WarpMirrorResult

java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.mirror.WarpMirrorResult
Record Components:
outcome - terminal outcome
changedPointCount - number of grid control points rewritten, 0 when not applied
compensatedDescendantCount - number of descendants whose forms were compensated, 0 when preservation was not requested or not applied
blockers - typed rejection details; empty for WarpMirrorOutcome.APPLIED and WarpMirrorOutcome.NO_CHANGE

@CubismEditor public record WarpMirrorResult(WarpMirrorOutcome outcome, int changedPointCount, int compensatedDescendantCount, List<WarpMirrorBlocker> blockers) extends Record
  • Constructor Details

    • WarpMirrorResult

      public WarpMirrorResult(WarpMirrorOutcome outcome, int changedPointCount, int compensatedDescendantCount, List<WarpMirrorBlocker> blockers)
      Creates an instance of a WarpMirrorResult record class.
      Parameters:
      outcome - the value for the outcome record component
      changedPointCount - the value for the changedPointCount record component
      compensatedDescendantCount - the value for the compensatedDescendantCount record component
      blockers - the value for the blockers record component
  • Method Details

    • applied

      public static WarpMirrorResult applied(int changedPoints, int compensated)
      Builds an applied result.
    • noChange

      public static WarpMirrorResult noChange()
      Builds a no-change result.
    • blocked

      public static WarpMirrorResult blocked(List<WarpMirrorBlocker> blockers)
      Builds a blocked result with the given typed blockers.
    • recoveryFailed

      public static WarpMirrorResult recoveryFailed(String reason)
      Builds a recovery-failed result.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • outcome

      public WarpMirrorOutcome outcome()
      Returns the value of the outcome record component.
      Returns:
      the value of the outcome record component
    • changedPointCount

      public int changedPointCount()
      Returns the value of the changedPointCount record component.
      Returns:
      the value of the changedPointCount record component
    • compensatedDescendantCount

      public int compensatedDescendantCount()
      Returns the value of the compensatedDescendantCount record component.
      Returns:
      the value of the compensatedDescendantCount record component
    • blockers

      public List<WarpMirrorBlocker> blockers()
      Returns the value of the blockers record component.
      Returns:
      the value of the blockers record component