Record Class DiagnosticSnapshot.ElementCounts
java.lang.Object
java.lang.Record
ca.mcscert.jpipe.compiler.model.DiagnosticSnapshot.ElementCounts
- Record Components:
conclusion- 1 when the model has a conclusion, 0 otherwise.subConclusion- number of sub-conclusions.strategy- number of strategies.evidence- number of evidence elements.abstractSupport- number of abstract support placeholders.
- Enclosing class:
DiagnosticSnapshot
public static record DiagnosticSnapshot.ElementCounts(int conclusion, int subConclusion, int strategy, int evidence, int abstractSupport)
extends Record
How many elements of each type a model holds.
conclusion is 0 or
1: the model owns at most one.-
Constructor Summary
ConstructorsConstructorDescriptionElementCounts(int conclusion, int subConclusion, int strategy, int evidence, int abstractSupport) Creates an instance of aElementCountsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theabstractSupportrecord component.intReturns the value of theconclusionrecord component.final booleanIndicates whether some other object is "equal to" this one.intevidence()Returns the value of theevidencerecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()True when the model holds no elements at all.intstrategy()Returns the value of thestrategyrecord component.intReturns the value of thesubConclusionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ElementCounts
public ElementCounts(int conclusion, int subConclusion, int strategy, int evidence, int abstractSupport) Creates an instance of aElementCountsrecord class.- Parameters:
conclusion- the value for theconclusionrecord componentsubConclusion- the value for thesubConclusionrecord componentstrategy- the value for thestrategyrecord componentevidence- the value for theevidencerecord componentabstractSupport- the value for theabstractSupportrecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty()True when the model holds no elements at all. -
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 with thecomparemethod from their corresponding wrapper classes. -
conclusion
public int conclusion()Returns the value of theconclusionrecord component.- Returns:
- the value of the
conclusionrecord component
-
subConclusion
public int subConclusion()Returns the value of thesubConclusionrecord component.- Returns:
- the value of the
subConclusionrecord component
-
strategy
-
evidence
-
abstractSupport
public int abstractSupport()Returns the value of theabstractSupportrecord component.- Returns:
- the value of the
abstractSupportrecord component
-