Package com.tnsai.coordination.council
Record Class CouncilResult
java.lang.Object
java.lang.Record
com.tnsai.coordination.council.CouncilResult
- Record Components:
stage1Responses- individual responses from all members (Stage 1)stage2Reviews- peer reviews with rankings (Stage 2)stage3Synthesis- chairman's synthesized answer (Stage 3)aggregateRanking- members sorted by average rank (best first)memberCount- total number of council membersduration- total deliberation time
public record CouncilResult(List<CouncilResponse> stage1Responses, List<CouncilReview> stage2Reviews, CouncilSynthesis stage3Synthesis, List<RankedMember> aggregateRanking, int memberCount, Duration duration)
extends Record
Result of a council deliberation.
- Since:
- 0.0.5
-
Constructor Summary
ConstructorsConstructorDescriptionCouncilResult(List<CouncilResponse> stage1Responses, List<CouncilReview> stage2Reviews, CouncilSynthesis stage3Synthesis, List<RankedMember> aggregateRanking, int memberCount, Duration duration) Creates an instance of aCouncilResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaggregateRankingrecord component.duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.The chairman's final synthesized answer (convenience accessor).final inthashCode()Returns a hash code value for this object.intReturns the value of thememberCountrecord component.Returns the value of thestage1Responsesrecord component.Returns the value of thestage2Reviewsrecord component.Returns the value of thestage3Synthesisrecord component.intNumber of successful Stage 1 responses.The top-ranked member (lowest average rank).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CouncilResult
public CouncilResult(List<CouncilResponse> stage1Responses, List<CouncilReview> stage2Reviews, CouncilSynthesis stage3Synthesis, List<RankedMember> aggregateRanking, int memberCount, Duration duration) Creates an instance of aCouncilResultrecord class.- Parameters:
stage1Responses- the value for thestage1Responsesrecord componentstage2Reviews- the value for thestage2Reviewsrecord componentstage3Synthesis- the value for thestage3Synthesisrecord componentaggregateRanking- the value for theaggregateRankingrecord componentmemberCount- the value for thememberCountrecord componentduration- the value for thedurationrecord component
-
-
Method Details
-
finalAnswer
The chairman's final synthesized answer (convenience accessor). -
topRanked
The top-ranked member (lowest average rank). -
successfulResponses
public int successfulResponses()Number of successful Stage 1 responses. -
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 '=='. -
stage1Responses
Returns the value of thestage1Responsesrecord component.- Returns:
- the value of the
stage1Responsesrecord component
-
stage2Reviews
Returns the value of thestage2Reviewsrecord component.- Returns:
- the value of the
stage2Reviewsrecord component
-
stage3Synthesis
Returns the value of thestage3Synthesisrecord component.- Returns:
- the value of the
stage3Synthesisrecord component
-
aggregateRanking
Returns the value of theaggregateRankingrecord component.- Returns:
- the value of the
aggregateRankingrecord component
-
memberCount
public int memberCount()Returns the value of thememberCountrecord component.- Returns:
- the value of the
memberCountrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-