Class PlayerIDAndList<T>

java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.Vector<T>
megamek.common.containers.PlayerIDAndList<T>
Type Parameters:
T - the datatype for the vector.
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, SequencedCollection<T>

public class PlayerIDAndList<T> extends Vector<T>
TODO: Adjust and replace this class with one that has the data as a member of the class versus just extending it.
See Also:
  • Constructor Details

    • PlayerIDAndList

      public PlayerIDAndList()
  • Method Details

    • getPlayerID

      public int getPlayerID()
      Returns the player ID
      Returns:
      the playerID
    • setPlayerID

      public void setPlayerID(int playerID)
      sets the playerID
      Parameters:
      playerID - the playerID
    • clone

      public PlayerIDAndList<T> clone()
      Clone method as is required for Vector. SuppressWarnings is needed as there is no clean way to clone a Vector of Data with type checking.
      Overrides:
      clone in class Vector<T>
      Returns:
      a clone of PlayerIDAndList that is templated to type T