Package dev.turboism.sdk.cubism.mirror
Record Class WarpMirrorResult
java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.mirror.WarpMirrorResult
- Record Components:
outcome- terminal outcomechangedPointCount- number of grid control points rewritten,0when not appliedcompensatedDescendantCount- number of descendants whose forms were compensated,0when preservation was not requested or not appliedblockers- typed rejection details; empty forWarpMirrorOutcome.APPLIEDandWarpMirrorOutcome.NO_CHANGE
@CubismEditor
public record WarpMirrorResult(WarpMirrorOutcome outcome, int changedPointCount, int compensatedDescendantCount, List<WarpMirrorBlocker> blockers)
extends Record
Result of one
WarpMirrorService.apply(WarpMirrorRequest) call.-
Constructor Summary
ConstructorsConstructorDescriptionWarpMirrorResult(WarpMirrorOutcome outcome, int changedPointCount, int compensatedDescendantCount, List<WarpMirrorBlocker> blockers) Creates an instance of aWarpMirrorResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WarpMirrorResultapplied(int changedPoints, int compensated) Builds an applied result.static WarpMirrorResultblocked(List<WarpMirrorBlocker> blockers) Builds a blocked result with the given typed blockers.blockers()Returns the value of theblockersrecord component.intReturns the value of thechangedPointCountrecord component.intReturns the value of thecompensatedDescendantCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static WarpMirrorResultnoChange()Builds a no-change result.outcome()Returns the value of theoutcomerecord component.static WarpMirrorResultrecoveryFailed(String reason) Builds a recovery-failed result.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WarpMirrorResult
public WarpMirrorResult(WarpMirrorOutcome outcome, int changedPointCount, int compensatedDescendantCount, List<WarpMirrorBlocker> blockers) Creates an instance of aWarpMirrorResultrecord class.- Parameters:
outcome- the value for theoutcomerecord componentchangedPointCount- the value for thechangedPointCountrecord componentcompensatedDescendantCount- the value for thecompensatedDescendantCountrecord componentblockers- the value for theblockersrecord component
-
-
Method Details
-
applied
Builds an applied result. -
noChange
Builds a no-change result. -
blocked
Builds a blocked result with the given typed blockers. -
recoveryFailed
Builds a recovery-failed result. -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
changedPointCount
public int changedPointCount()Returns the value of thechangedPointCountrecord component.- Returns:
- the value of the
changedPointCountrecord component
-
compensatedDescendantCount
public int compensatedDescendantCount()Returns the value of thecompensatedDescendantCountrecord component.- Returns:
- the value of the
compensatedDescendantCountrecord component
-
blockers
Returns the value of theblockersrecord component.- Returns:
- the value of the
blockersrecord component
-