Record Class ResultUseRule.Evaluation<S>

java.lang.Object
java.lang.Record
com.google.errorprone.bugpatterns.checkreturnvalue.ResultUseRule.Evaluation<S>
Type Parameters:
S - the type of symbols
Record Components:
rule - The rule that made this evaluation.
scope - The scope at which the evaluation was made.
element - The specific element in the scope for which the evaluation was made.
policy - The policy the rule selected.
Enclosing class:
ResultUseRule<C,S>

public static record ResultUseRule.Evaluation<S>(ResultUseRule<?,S> rule, ResultUseRule.RuleScope scope, S element, ResultUsePolicy policy) extends Record
An evaluation that a rule makes.
  • Constructor Details

    • Evaluation

      public Evaluation(ResultUseRule<?,S> rule, ResultUseRule.RuleScope scope, S element, ResultUsePolicy policy)
      Creates an instance of a Evaluation record class.
      Parameters:
      rule - the value for the rule record component
      scope - the value for the scope record component
      element - the value for the element record component
      policy - the value for the policy record component
  • Method Details

    • create

      public static <S> ResultUseRule.Evaluation<S> create(ResultUseRule<?,S> rule, ResultUseRule.RuleScope scope, S element, ResultUsePolicy policy)
    • 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 Objects::equals(Object,Object).
      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.
    • rule

      public ResultUseRule<?,S> rule()
      Returns the value of the rule record component.
      Returns:
      the value of the rule record component
    • scope

      public ResultUseRule.RuleScope scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • element

      public S element()
      Returns the value of the element record component.
      Returns:
      the value of the element record component
    • policy

      public ResultUsePolicy policy()
      Returns the value of the policy record component.
      Returns:
      the value of the policy record component