-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Environment,java.io.Serializable,java.lang.Iterable
public abstract class Abstract2DEnvironment<T, P extends Position2D<P>> extends AbstractEnvironment<T, P>
Models a bidimensional environment.
-
-
Method Summary
Modifier and Type Method Description final intgetDimensions()final Array<double>getOffset()final Array<double>getSize()voidmoveNodeToPosition(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.implementations.environments.AbstractEnvironment
addLayer, addNode, addTerminator, forEach, getDistanceBetweenNodes, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, iterator, removeNode, setLinkingRule, setSimulation, spliterator, toString -
Methods inherited from class it.unibo.alchemist.model.interfaces.Environment
addLayer, addNode, addTerminator, getDistanceBetweenNodes, getIncarnation, getLayer, getLayers, getLinkingRule, getNeighborhood, getNodeByID, getNodeCount, getNodes, getNodesWithinRange, getPosition, getSimulation, getSizeInDistanceUnits, isTerminated, makePosition, 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.
-
-
-
-