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

    Constructors
    Constructor
    Description
    OddsResult(double winProbabilityA, double drawProbability, double winProbabilityB, double decimalOddsA, double decimalOddsB, double decimalOddsDraw)
    Creates an instance of a OddsResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the decimalOddsA record component.
    double
    Returns the value of the decimalOddsB record component.
    double
    Returns the value of the decimalOddsDraw record component.
    double
    Returns the value of the drawProbability record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the winProbabilityA record component.
    double
    Returns the value of the winProbabilityB record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OddsResult

      public OddsResult(double winProbabilityA, double drawProbability, double winProbabilityB, double decimalOddsA, double decimalOddsB, double decimalOddsDraw)
      Creates an instance of a OddsResult record class.
      Parameters:
      winProbabilityA - the value for the winProbabilityA record component
      drawProbability - the value for the drawProbability record component
      winProbabilityB - the value for the winProbabilityB record component
      decimalOddsA - the value for the decimalOddsA record component
      decimalOddsB - the value for the decimalOddsB record component
      decimalOddsDraw - the value for the decimalOddsDraw 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.
    • winProbabilityA

      public double winProbabilityA()
      Returns the value of the winProbabilityA record component.
      Returns:
      the value of the winProbabilityA record component
    • drawProbability

      public double drawProbability()
      Returns the value of the drawProbability record component.
      Returns:
      the value of the drawProbability record component
    • winProbabilityB

      public double winProbabilityB()
      Returns the value of the winProbabilityB record component.
      Returns:
      the value of the winProbabilityB record component
    • decimalOddsA

      public double decimalOddsA()
      Returns the value of the decimalOddsA record component.
      Returns:
      the value of the decimalOddsA record component
    • decimalOddsB

      public double decimalOddsB()
      Returns the value of the decimalOddsB record component.
      Returns:
      the value of the decimalOddsB record component
    • decimalOddsDraw

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