Record Class PatternDescription
java.lang.Object
java.lang.Record
dev.archunitjava.pattern.PatternDescription
- All Implemented Interfaces:
Comparable<PatternDescription>
public record PatternDescription(PatternSyntax syntax, PatternDomain domain, String expression)
extends Record
implements Comparable<PatternDescription>
Immutable, deterministic metadata describing a compiled matcher.
-
Constructor Summary
ConstructorsConstructorDescriptionPatternDescription(PatternSyntax syntax, PatternDomain domain, String expression) Creates an instance of aPatternDescriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PatternDescription other) domain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.syntax()Returns the value of thesyntaxrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PatternDescription
Creates an instance of aPatternDescriptionrecord class.- Parameters:
syntax- the value for thesyntaxrecord componentdomain- the value for thedomainrecord componentexpression- the value for theexpressionrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<PatternDescription>
-
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). -
syntax
Returns the value of thesyntaxrecord component.- Returns:
- the value of the
syntaxrecord component
-
domain
Returns the value of thedomainrecord component.- Returns:
- the value of the
domainrecord component
-
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-