Record Class DoublingDecision.Response
java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.DoublingDecision.Response
- Record Components:
id- the decision idseat- the responder's seat, exactlyWhiteorBlackofferedBy- the seat that made the double offer, exactlyWhiteorBlackproposedStake- the proposed stake if accepted
- All Implemented Interfaces:
DoublingDecision
- Enclosing interface:
DoublingDecision
public static record DoublingDecision.Response(String id, String seat, String offeredBy, long proposedStake)
extends Record
implements DoublingDecision
A response decision awaiting the responder's choice to accept or decline an offer.
-
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.Returns the value of theofferedByrecord component.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
-
Response
-
-
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
-
offeredBy
-
proposedStake
public long proposedStake()Returns the value of theproposedStakerecord component.- Specified by:
proposedStakein interfaceDoublingDecision- Returns:
- the value of the
proposedStakerecord component
-