Record Class DoublingDecision.Offer
java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.DoublingDecision.Offer
- Record Components:
id- the decision idseat- the turn owner's seat, exactlyWhiteorBlackproposedStake- the proposed stake if doubled
- All Implemented Interfaces:
DoublingDecision
- Enclosing interface:
DoublingDecision
public static record DoublingDecision.Offer(String id, String seat, long proposedStake)
extends Record
implements DoublingDecision
An offer decision awaiting the turn owner's choice to offer a double or roll.
-
Nested Class Summary
Nested classes/interfaces inherited from interface DoublingDecision
DoublingDecision.Offer, DoublingDecision.Response -
Field Summary
Fields inherited from interface DoublingDecision
ID_PATTERN, KIND_OFFER, KIND_RESPONSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.kind()Returns the decision kind, exactlyofferorresponse.longReturns the value of theproposedStakerecord component.seat()Returns the value of theseatrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Offer
-
-
Method Details
-
kind
Description copied from interface:DoublingDecisionReturns the decision kind, exactlyofferorresponse.- Specified by:
kindin interfaceDoublingDecision- Returns:
- the decision kind
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceDoublingDecision- Returns:
- the value of the
idrecord component
-
seat
Returns the value of theseatrecord component.- Specified by:
seatin interfaceDoublingDecision- Returns:
- the value of the
seatrecord component
-
proposedStake
public long proposedStake()Returns the value of theproposedStakerecord component.- Specified by:
proposedStakein interfaceDoublingDecision- Returns:
- the value of the
proposedStakerecord component
-