|
| 1 | +package com.sportradar.mbs.sdk.entities.odds; |
| 2 | + |
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 4 | + |
| 5 | +import java.math.BigInteger; |
| 6 | + |
| 7 | +/** |
| 8 | + * Represents fractional odds. |
| 9 | + */ |
| 10 | +public class FractionalOdds extends Odds { |
| 11 | + |
| 12 | + @JsonProperty("numerator") |
| 13 | + private BigInteger numerator; |
| 14 | + @JsonProperty("denominator") |
| 15 | + private BigInteger denominator; |
| 16 | + |
| 17 | + /** |
| 18 | + * Creates a new instance of the FractionalOdds.Builder class. |
| 19 | + * |
| 20 | + * @return A new instance of the FractionalOdds.Builder class. |
| 21 | + */ |
| 22 | + public static Builder newBuilder() { |
| 23 | + return new Builder(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * Gets the value of the numerator (top, first part) of the fractional odds. |
| 28 | + * |
| 29 | + * @return The value of the numerator. |
| 30 | + */ |
| 31 | + public BigInteger getNumerator() { |
| 32 | + return this.numerator; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * Sets the value of the numerator (top, first part) of the fractional odds. |
| 37 | + * |
| 38 | + * @param value The value of the decimal odds. |
| 39 | + */ |
| 40 | + public void setNumerator(BigInteger value) { |
| 41 | + this.numerator = value; |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * Gets the value of the denominator (bottom, last part) of the fractional odds. |
| 46 | + * |
| 47 | + * @return The value of the denominator. |
| 48 | + */ |
| 49 | + public BigInteger getDenominator() { |
| 50 | + return this.denominator; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * Sets the value of the denominator (bottom, last part) of the fractional odds. |
| 55 | + * |
| 56 | + * @param value The value of the decimal odds. |
| 57 | + */ |
| 58 | + public void setDenominator(BigInteger value) { |
| 59 | + this.denominator = value; |
| 60 | + } |
| 61 | + |
| 62 | + public static class Builder { |
| 63 | + |
| 64 | + private final FractionalOdds instance = new FractionalOdds(); |
| 65 | + |
| 66 | + private Builder() { |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Builds and returns the FractionalOdds instance. |
| 71 | + * |
| 72 | + * @return The built FractionalOdds instance. |
| 73 | + */ |
| 74 | + public FractionalOdds build() { |
| 75 | + return this.instance; |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * Sets the value of the denominator (bottom, last part) of the fractional odds. |
| 80 | + * |
| 81 | + * @param value The value of the denominator (bottom, last part) of the fractional odds. |
| 82 | + * @return The FractionalOdds.Builder instance. |
| 83 | + */ |
| 84 | + public Builder setNumerator(BigInteger value) { |
| 85 | + this.instance.setNumerator(value); |
| 86 | + return this; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Sets the value of the denominator (bottom, last part) of the fractional odds. |
| 91 | + * |
| 92 | + * @param value The value of the denominator (bottom, last part) of the fractional odds. |
| 93 | + * @return The FractionalOdds.Builder instance. |
| 94 | + */ |
| 95 | + public Builder setDenominator(BigInteger value) { |
| 96 | + this.instance.setDenominator(value); |
| 97 | + return this; |
| 98 | + } |
| 99 | + } |
| 100 | +} |
0 commit comments