20 package net.sf.gridarta.gui.panel.connectionview;
22 import java.util.ArrayList;
23 import java.util.Collections;
24 import java.util.Iterator;
25 import java.util.List;
27 import org.jetbrains.annotations.NotNull;
34 public class Connection<K>
implements Iterable<GameObject<?, ?, ?>> {
49 private final List<GameObject<?, ?, ?>>
gameObjects =
new ArrayList<>(2);
64 @SuppressWarnings(
"TypeMayBeWeakened")
81 public Iterator<GameObject<?, ?, ?>>
iterator() {
82 return Collections.unmodifiableList(
gameObjects).iterator();
Stores GameObjects related to key values.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
K getKey()
Return the key.
Connection(@NotNull final K key)
Create a new instance.
Iterator< GameObject<?, ?, ?> > iterator()
final List< GameObject<?, ?, ?> > gameObjects
The game objects for this connection.
void addGameObject(@NotNull final GameObject<?, ?, ?> gameObject)
Add a game object.