Class EntityActionLog
java.lang.Object
megamek.client.ui.clientGUI.tooltip.EntityActionLog
- All Implemented Interfaces:
Iterable<EntityAction>,Collection<EntityAction>
An ordered List-like collection of EntityActions with a cached description of each action, created as the action is
added.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, EntityAction entityAction) booleanadd(EntityAction entityAction) booleanaddAll(Collection<? extends EntityAction> entityActions) voidclear()remove all items from all internal collectionsbooleanbooleancontainsAll(Collection<?> collection) booleanisEmpty()iterator()voidrepopulate the descriptions for each action, using the cache, or recomputing as appropriatebooleanRemove an item and its cachesbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> c) intsize()stream()Object[]toArray()<T> T[]toArray(T[] a) toVector()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, toArray
-
Constructor Details
-
EntityActionLog
-
-
Method Details
-
getDescriptions
- Returns:
- a list of description strings. Note that there may be fewer than the number of actions as similar actions are summarized in a single entry
-
rebuildDescriptions
public void rebuildDescriptions()repopulate the descriptions for each action, using the cache, or recomputing as appropriate -
toVector
- Returns:
- a clone of the internal List of EntityActions
-
clear
public void clear()remove all items from all internal collections- Specified by:
clearin interfaceCollection<EntityAction>
-
add
- Specified by:
addin interfaceCollection<EntityAction>
-
add
-
remove
Remove an item and its caches- Specified by:
removein interfaceCollection<EntityAction>
-
containsAll
- Specified by:
containsAllin interfaceCollection<EntityAction>
-
addAll
- Specified by:
addAllin interfaceCollection<EntityAction>
-
removeAll
- Specified by:
removeAllin interfaceCollection<EntityAction>
-
retainAll
- Specified by:
retainAllin interfaceCollection<EntityAction>
-
firstElement
-
lastElement
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<EntityAction>
-
contains
- Specified by:
containsin interfaceCollection<EntityAction>
-
size
public int size()- Specified by:
sizein interfaceCollection<EntityAction>
-
iterator
- Specified by:
iteratorin interfaceCollection<EntityAction>- Specified by:
iteratorin interfaceIterable<EntityAction>
-
toArray
- Specified by:
toArrayin interfaceCollection<EntityAction>
-
toArray
@Nonnull public <T> T[] toArray(@Nonnull T[] a) - Specified by:
toArrayin interfaceCollection<EntityAction>
-
stream
- Specified by:
streamin interfaceCollection<EntityAction>
-