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 homerestDaysDifference- 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 Summary
ConstructorsConstructorDescriptionMatchContext(boolean isHomeGame, double restDaysDifference, double injuryImpact, double formDifference, double headToHeadAdvantage) Creates an instance of aMatchContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theformDifferencerecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theheadToHeadAdvantagerecord component.doubleReturns the value of theinjuryImpactrecord component.booleanReturns the value of theisHomeGamerecord component.doubleReturns the value of therestDaysDifferencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MatchContext
public MatchContext(boolean isHomeGame, double restDaysDifference, double injuryImpact, double formDifference, double headToHeadAdvantage) Creates an instance of aMatchContextrecord class.- Parameters:
isHomeGame- the value for theisHomeGamerecord componentrestDaysDifference- the value for therestDaysDifferencerecord componentinjuryImpact- the value for theinjuryImpactrecord componentformDifference- the value for theformDifferencerecord componentheadToHeadAdvantage- the value for theheadToHeadAdvantagerecord component
-
-
Method Details
-
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. -
isHomeGame
public boolean isHomeGame()Returns the value of theisHomeGamerecord component.- Returns:
- the value of the
isHomeGamerecord component
-
restDaysDifference
public double restDaysDifference()Returns the value of therestDaysDifferencerecord component.- Returns:
- the value of the
restDaysDifferencerecord component
-
injuryImpact
public double injuryImpact()Returns the value of theinjuryImpactrecord component.- Returns:
- the value of the
injuryImpactrecord component
-
formDifference
public double formDifference()Returns the value of theformDifferencerecord component.- Returns:
- the value of the
formDifferencerecord component
-
headToHeadAdvantage
public double headToHeadAdvantage()Returns the value of theheadToHeadAdvantagerecord component.- Returns:
- the value of the
headToHeadAdvantagerecord component
-