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 Details

    • ElementCounts

      public ElementCounts(int conclusion, int subConclusion, int strategy, int evidence, int abstractSupport)
      Creates an instance of a ElementCounts record class.
      Parameters:
      conclusion - the value for the conclusion record component
      subConclusion - the value for the subConclusion record component
      strategy - the value for the strategy record component
      evidence - the value for the evidence record component
      abstractSupport - the value for the abstractSupport record component
  • Method Details

    • isEmpty

      public boolean isEmpty()
      True when the model holds no elements at all.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • conclusion

      public int conclusion()
      Returns the value of the conclusion record component.
      Returns:
      the value of the conclusion record component
    • subConclusion

      public int subConclusion()
      Returns the value of the subConclusion record component.
      Returns:
      the value of the subConclusion record component
    • strategy

      public int strategy()
      Returns the value of the strategy record component.
      Returns:
      the value of the strategy record component
    • evidence

      public int evidence()
      Returns the value of the evidence record component.
      Returns:
      the value of the evidence record component
    • abstractSupport

      public int abstractSupport()
      Returns the value of the abstractSupport record component.
      Returns:
      the value of the abstractSupport record component