Class Participants

All Implemented Interfaces:
IExtendable, Visitable<Participant>, Iterable<Participant>

public final class Participants extends ExtendableObject implements Iterable<Participant>, Visitable<Participant>
Helper class providing iterator and visitor methods for Session Participants.
  • Method Details

    • iterator

      public Iterator<Participant> iterator()
      Specified by:
      iterator in interface Iterable<Participant>
    • getParticipantById

      public Participant getParticipantById(String id)
      Return participant for given id
      Parameters:
      id -
      Returns:
      participant with given id or null
    • accept

      public void accept(Visitor<Participant> visitor)
      Description copied from interface: Visitable
      Accept the given visitor.
      Specified by:
      accept in interface Visitable<Participant>
    • getRoleCount

      public Map<ParticipantRole,Integer> getRoleCount()
      Count participant roles in session
      Returns:
      map of participant roles to count
    • getPreferredParticipantId

      public String getPreferredParticipantId(ParticipantRole role)
      Get next participant id based on role
      Parameters:
      role -
      Returns:
      next preferred participant id
    • determineParticipantAge

      public Period determineParticipantAge(Participant participant)
      Determine age for a participant based on the following rules:
      • If session date and participant birthday is available, return calculated period
      • If participant age has been manually set, return specified age
      • return Optional.empty()
      Parameters:
      participant - age if available
    • otherParticipants

      public List<Participant> otherParticipants(Participant participant)
      Returns a list of participants which does not include the given participant.
      Parameters:
      participant -
      Returns:
      all other participants in session
    • copyParticipantInfo

      public static void copyParticipantInfo(Participant src, Participant dest)
    • stream

      public Stream<Participant> stream()
    • stream

      public Stream<Participant> stream(boolean parallel)
      Return participant stream
      Parameters:
      parallel -