Class Connection<K>
- java.lang.Object
-
- net.sf.gridarta.gui.panel.connectionview.Connection<K>
-
- All Implemented Interfaces:
java.lang.Iterable<GameObject<?,?,?>>
public class Connection<K> extends java.lang.Object implements java.lang.Iterable<GameObject<?,?,?>>
StoresGameObjectsrelated to key values. A connection consists of a key object, and a set ofGameObjects.
-
-
Constructor Summary
Constructors Constructor Description Connection(K key)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGameObject(@NotNull GameObject<?,?,?> gameObject)Adds a game object.KgetKey()Returns the key.@NotNull java.util.Iterator<GameObject<?,?,?>>iterator()
-
-
-
Constructor Detail
-
Connection
public Connection(@NotNull K key)Creates a new instance.- Parameters:
key- the key
-
-
Method Detail
-
getKey
@NotNull public K getKey()
Returns the key.- Returns:
- the key
-
addGameObject
public void addGameObject(@NotNull @NotNull GameObject<?,?,?> gameObject)Adds a game object.- Parameters:
gameObject- the game object to add
-
iterator
@NotNull public @NotNull java.util.Iterator<GameObject<?,?,?>> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<K>
-
-