Class Abstract2DEnvironment
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Environment
,java.io.Serializable
,java.lang.Iterable
public abstract class Abstract2DEnvironment<T, P extends Position2D<P>> extends AbstractEnvironment<T, P>
Models a bidimensional environment.
-
-
Field Summary
Fields Modifier and Type Field Description public final ListSet<GlobalReaction<T>>
globalReactions
public final ListSet<Node<T>>
nodes
public transient Incarnation<T, P>
incarnation
public transient Simulation<T, P>
simulation
-
Method Summary
Modifier and Type Method Description final int
getDimensions()
final Array<double>
getOffset()
final Array<double>
getSize()
void
moveNodeToPosition(Node<T> node, P newpos)
Subclasses may override this method if they want to change the way a node moves towards some absolute position. -
Methods inherited from class it.unibo.alchemist.model.environments.AbstractEnvironment
addGlobalReaction, addLayer, addNode, addTerminator, forEach, getDistanceBetweenNodes, getGlobalReactions, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, iterator, removeGlobalReaction, removeNode, setLinkingRule, setSimulation, spliterator, toString
-
Methods inherited from class it.unibo.alchemist.model.Environment
addGlobalReaction, addLayer, addNode, addTerminator, getDistanceBetweenNodes, getGlobalReactions, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, makePosition, removeGlobalReaction, removeNode, setLinkingRule, setSimulation
-
Methods inherited from class java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDimensions
final int getDimensions()
-
moveNodeToPosition
void moveNodeToPosition(Node<T> node, P newpos)
Subclasses may override this method if they want to change the way a node moves towards some absolute position.
-
-
-
-