Record Class MetricSample
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.MetricSample
- All Implemented Interfaces:
Comparable<MetricSample>
public record MetricSample(StableId subject, MetricName metric, MetricAmount amount)
extends Record
implements Comparable<MetricSample>
One deterministic metric observation for one typed architecture subject.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricSample(StableId subject, MetricName metric, MetricAmount amount) Creates an instance of aMetricSamplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.intcompareTo(MetricSample other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metric()Returns the value of themetricrecord component.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetricSample
Creates an instance of aMetricSamplerecord class.- Parameters:
subject- the value for thesubjectrecord componentmetric- the value for themetricrecord componentamount- the value for theamountrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<MetricSample>
-
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). -
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
metric
Returns the value of themetricrecord component.- Returns:
- the value of the
metricrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-