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 members
duration - 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 Details

  • Method Details

    • finalAnswer

      public String finalAnswer()
      The chairman's final synthesized answer (convenience accessor).
    • topRanked

      public Optional<RankedMember> topRanked()
      The top-ranked member (lowest average rank).
    • successfulResponses

      public int successfulResponses()
      Number of successful Stage 1 responses.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stage1Responses

      public List<CouncilResponse> stage1Responses()
      Returns the value of the stage1Responses record component.
      Returns:
      the value of the stage1Responses record component
    • stage2Reviews

      public List<CouncilReview> stage2Reviews()
      Returns the value of the stage2Reviews record component.
      Returns:
      the value of the stage2Reviews record component
    • stage3Synthesis

      public CouncilSynthesis stage3Synthesis()
      Returns the value of the stage3Synthesis record component.
      Returns:
      the value of the stage3Synthesis record component
    • aggregateRanking

      public List<RankedMember> aggregateRanking()
      Returns the value of the aggregateRanking record component.
      Returns:
      the value of the aggregateRanking record component
    • memberCount

      public int memberCount()
      Returns the value of the memberCount record component.
      Returns:
      the value of the memberCount record component
    • duration

      public Duration duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component