public class Connection<K> extends java.lang.Object implements java.lang.Iterable<GameObject<?,?,?>>
GameObjects
related to key values. A connection
consists of a key object, and a set of GameObject
s.Constructor and Description |
---|
Connection(K key)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addGameObject(@NotNull GameObject<?,?,?> gameObject)
Adds a game object.
|
K |
getKey()
Returns the key.
|
@NotNull java.util.Iterator<GameObject<?,?,?>> |
iterator() |
public Connection(@NotNull K key)
key
- the key@NotNull public K getKey()
public void addGameObject(@NotNull @NotNull GameObject<?,?,?> gameObject)
gameObject
- the game object to add@NotNull public @NotNull java.util.Iterator<GameObject<?,?,?>> iterator()
iterator
in interface java.lang.Iterable<GameObject<?,?,?>>