Record Class Suppression
java.lang.Object
java.lang.Record
dev.archunitjava.baseline.Suppression
- All Implemented Interfaces:
Comparable<Suppression>
public record Suppression(String id, String rationale, Optional<String> ruleId, Optional<String> subjectId, Optional<String> evidenceLocation, Optional<LocalDate> expiresOn)
extends Record
implements Comparable<Suppression>
Reviewed, rationalized suppression with composable exact scope and optional expiry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Suppression other) final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceLocationrecord component.booleanExpiry dates are inclusive: the suppression is valid through the named date.Returns the value of theexpiresOnrecord component.static Suppressionfinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanmatches(BaselineFinding finding) Returns the value of therationalerecord component.ruleId()Returns the value of theruleIdrecord component.Returns the value of thesubjectIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Suppression
public Suppression(String id, String rationale, Optional<String> ruleId, Optional<String> subjectId, Optional<String> evidenceLocation, Optional<LocalDate> expiresOn) Creates an instance of aSuppressionrecord class.- Parameters:
id- the value for theidrecord componentrationale- the value for therationalerecord componentruleId- the value for theruleIdrecord componentsubjectId- the value for thesubjectIdrecord componentevidenceLocation- the value for theevidenceLocationrecord componentexpiresOn- the value for theexpiresOnrecord component
-
-
Method Details
-
forRule
-
matches
-
expiredOn
Expiry dates are inclusive: the suppression is valid through the named date. -
compareTo
- Specified by:
compareToin interfaceComparable<Suppression>
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
rationale
Returns the value of therationalerecord component.- Returns:
- the value of the
rationalerecord component
-
ruleId
-
subjectId
-
evidenceLocation
-
expiresOn
-