Record Class FindingChange
java.lang.Object
java.lang.Record
dev.archunitjava.baseline.FindingChange
- All Implemented Interfaces:
Comparable<FindingChange>
public record FindingChange(FindingState state, Optional<BaselineFinding> previous, Optional<BaselineFinding> current, Optional<String> suppressionId)
extends Record
implements Comparable<FindingChange>
One deterministic comparison entry, retaining both sides when a finding moved.
-
Constructor Summary
ConstructorsConstructorDescriptionFindingChange(FindingState state, Optional<BaselineFinding> previous, Optional<BaselineFinding> current, Optional<String> suppressionId) Creates an instance of aFindingChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(FindingChange other) current()Returns the value of thecurrentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.previous()Returns the value of thepreviousrecord component.state()Returns the value of thestaterecord component.Returns the value of thesuppressionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FindingChange
public FindingChange(FindingState state, Optional<BaselineFinding> previous, Optional<BaselineFinding> current, Optional<String> suppressionId) Creates an instance of aFindingChangerecord class.- Parameters:
state- the value for thestaterecord componentprevious- the value for thepreviousrecord componentcurrent- the value for thecurrentrecord componentsuppressionId- the value for thesuppressionIdrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FindingChange>
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
previous
Returns the value of thepreviousrecord component.- Returns:
- the value of the
previousrecord component
-
current
Returns the value of thecurrentrecord component.- Returns:
- the value of the
currentrecord component
-
suppressionId
-