Package com.tnsai.coordination.debate
Record Class DebateRound
java.lang.Object
java.lang.Record
com.tnsai.coordination.debate.DebateRound
public record DebateRound(int roundNumber, String proponentArgument, String opponentArgument, Duration duration)
extends Record
Record of a single round in a debate.
- Since:
- 0.0.5
-
Constructor Summary
ConstructorsConstructorDescriptionDebateRound(int roundNumber, String proponentArgument, String opponentArgument, Duration duration) Creates an instance of aDebateRoundrecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theopponentArgumentrecord component.Returns the value of theproponentArgumentrecord component.intReturns the value of theroundNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DebateRound
public DebateRound(int roundNumber, String proponentArgument, String opponentArgument, Duration duration) Creates an instance of aDebateRoundrecord class.- Parameters:
roundNumber- the value for theroundNumberrecord componentproponentArgument- the value for theproponentArgumentrecord componentopponentArgument- the value for theopponentArgumentrecord componentduration- the value for thedurationrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
roundNumber
public int roundNumber()Returns the value of theroundNumberrecord component.- Returns:
- the value of the
roundNumberrecord component
-
proponentArgument
Returns the value of theproponentArgumentrecord component.- Returns:
- the value of the
proponentArgumentrecord component
-
opponentArgument
Returns the value of theopponentArgumentrecord component.- Returns:
- the value of the
opponentArgumentrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-