Record Class BettingOddsCalculator.OddsResult
java.lang.Object
java.lang.Record
org.episteme.social.sports.BettingOddsCalculator.OddsResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
BettingOddsCalculator
public static record BettingOddsCalculator.OddsResult(double winProbabilityA, double drawProbability, double winProbabilityB, double decimalOddsA, double decimalOddsB, double decimalOddsDraw)
extends Record
implements Serializable
The result of an odds calculation, including probabilities and decimal odds.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOddsResult(double winProbabilityA, double drawProbability, double winProbabilityB, double decimalOddsA, double decimalOddsB, double decimalOddsDraw) Creates an instance of aOddsResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedecimalOddsArecord component.doubleReturns the value of thedecimalOddsBrecord component.doubleReturns the value of thedecimalOddsDrawrecord component.doubleReturns the value of thedrawProbabilityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thewinProbabilityArecord component.doubleReturns the value of thewinProbabilityBrecord component.
-
Constructor Details
-
OddsResult
public OddsResult(double winProbabilityA, double drawProbability, double winProbabilityB, double decimalOddsA, double decimalOddsB, double decimalOddsDraw) Creates an instance of aOddsResultrecord class.- Parameters:
winProbabilityA- the value for thewinProbabilityArecord componentdrawProbability- the value for thedrawProbabilityrecord componentwinProbabilityB- the value for thewinProbabilityBrecord componentdecimalOddsA- the value for thedecimalOddsArecord componentdecimalOddsB- the value for thedecimalOddsBrecord componentdecimalOddsDraw- the value for thedecimalOddsDrawrecord 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. -
winProbabilityA
public double winProbabilityA()Returns the value of thewinProbabilityArecord component.- Returns:
- the value of the
winProbabilityArecord component
-
drawProbability
public double drawProbability()Returns the value of thedrawProbabilityrecord component.- Returns:
- the value of the
drawProbabilityrecord component
-
winProbabilityB
public double winProbabilityB()Returns the value of thewinProbabilityBrecord component.- Returns:
- the value of the
winProbabilityBrecord component
-
decimalOddsA
public double decimalOddsA()Returns the value of thedecimalOddsArecord component.- Returns:
- the value of the
decimalOddsArecord component
-
decimalOddsB
public double decimalOddsB()Returns the value of thedecimalOddsBrecord component.- Returns:
- the value of the
decimalOddsBrecord component
-
decimalOddsDraw
public double decimalOddsDraw()Returns the value of thedecimalOddsDrawrecord component.- Returns:
- the value of the
decimalOddsDrawrecord component
-