Class PlayerList

  • All Implemented Interfaces:
    java.lang.Iterable<IPlayer>

    public class PlayerList
    extends java.lang.Object
    implements java.lang.Iterable<IPlayer>
    Singleton beans holding all players.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2015 Created on Aug 28, 2015
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<IPlayer> players  
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayerList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(IPlayer player)  
      boolean contains​(java.lang.Object o)  
      boolean equals​(java.lang.Object o)  
      IPlayer get​(int index)  
      int hashCode()  
      boolean isEmpty()  
      java.util.Iterator<IPlayer> iterator()  
      int size()  
      java.util.stream.Stream<IPlayer> stream()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • players

        private java.util.List<IPlayer> players
    • Constructor Detail

      • PlayerList

        public PlayerList()
    • Method Detail

      • size

        public int size()
      • isEmpty

        public boolean isEmpty()
      • contains

        public boolean contains​(java.lang.Object o)
      • iterator

        public java.util.Iterator<IPlayer> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<IPlayer>
      • add

        public boolean add​(IPlayer player)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • get

        public IPlayer get​(int index)
      • stream

        public java.util.stream.Stream<IPlayer> stream()