Package megamek.common.containers
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>
TODO: Adjust and replace this class with one that has the data as a member of the class versus just extending it.
- See Also:
-
Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone method as is required for Vector.intReturns the player IDvoidsetPlayerID(int playerID) sets the playerIDMethods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
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
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:
clonein classVector<T>- Returns:
- a clone of
PlayerIDAndListthat is templated to type T
-