Record Class BettingOddsCalculator.MatchContext

java.lang.Object
java.lang.Record
org.episteme.social.sports.BettingOddsCalculator.MatchContext
Record Components:
isHomeGame - True if Team A is playing at home
restDaysDifference - Days rested (A - B). Positive favors A.
injuryImpact - 0.0 to 1.0 representing squad depletion (for A)
formDifference - -1.0 to 1.0 representing recent form (A - B)
headToHeadAdvantage - -1.0 to 1.0 historical advantage
All Implemented Interfaces:
Serializable
Enclosing class:
BettingOddsCalculator

public static record BettingOddsCalculator.MatchContext(boolean isHomeGame, double restDaysDifference, double injuryImpact, double formDifference, double headToHeadAdvantage) extends Record implements Serializable
Contextual factors that influence the outcome of a match.
Since:
1.0
Version:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • MatchContext

      public MatchContext(boolean isHomeGame, double restDaysDifference, double injuryImpact, double formDifference, double headToHeadAdvantage)
      Creates an instance of a MatchContext record class.
      Parameters:
      isHomeGame - the value for the isHomeGame record component
      restDaysDifference - the value for the restDaysDifference record component
      injuryImpact - the value for the injuryImpact record component
      formDifference - the value for the formDifference record component
      headToHeadAdvantage - the value for the headToHeadAdvantage record component
  • Method Details

    • 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.
    • isHomeGame

      public boolean isHomeGame()
      Returns the value of the isHomeGame record component.
      Returns:
      the value of the isHomeGame record component
    • restDaysDifference

      public double restDaysDifference()
      Returns the value of the restDaysDifference record component.
      Returns:
      the value of the restDaysDifference record component
    • injuryImpact

      public double injuryImpact()
      Returns the value of the injuryImpact record component.
      Returns:
      the value of the injuryImpact record component
    • formDifference

      public double formDifference()
      Returns the value of the formDifference record component.
      Returns:
      the value of the formDifference record component
    • headToHeadAdvantage

      public double headToHeadAdvantage()
      Returns the value of the headToHeadAdvantage record component.
      Returns:
      the value of the headToHeadAdvantage record component