-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.CellNode,it.unibo.alchemist.model.interfaces.CellWithCircularArea,it.unibo.alchemist.model.interfaces.Node,it.unibo.alchemist.model.interfaces.Node,java.io.Serializable,java.lang.Comparable,java.lang.Iterable
public class CellNodeImpl<P extends Position<P>, Vector<P>> extends DoubleNode implements CellNode<P>, CellWithCircularArea<P>
-
-
Constructor Summary
Constructors Constructor Description CellNodeImpl(Environment<Double, P> env, double diameter)create a new cell node. CellNodeImpl(Environment<Double, P> env)
-
Method Summary
Modifier and Type Method Description final Map<Junction, Map<CellNode<out Object>, Integer>>getJunctions()final doublegetDiameter()final PgetPolarizationVersor()final voidsetConcentration(Molecule mol, Double c)final voidsetPolarization(P v)set the polarization versor, e.g. final voidaddPolarization(P v)add v to the polarization versor inside the cell; useful for considering the combination of various stimuli in a cell. final booleancontains(Molecule m)final voidaddJunction(Junction j, CellNode<out Object> neighbor)Add a junction to the current node. final booleancontainsJunction(Junction j)Return true if a junction is present in the current node, false otherwise. final voidremoveJunction(Junction j, CellNode<out Object> neighbor)Remove a junction from this node. final Set<CellNode<out Object>>getNeighborsLinkWithJunction(Junction j)Returns a set of ICellNode which are linked with the current node by a junction of the type j. final Set<CellNode<out Object>>getAllNodesLinkWithJunction()final intgetJunctionsCount()final doublegetRadius()StringtoString()-
Methods inherited from class it.unibo.alchemist.model.implementations.nodes.AbstractNode
addReaction, cloneNode, compareTo, equals, forEach, getConcentration, getContents, getId, getMoleculeCount, getReactions, hashCode, iterator, removeConcentration, removeReaction, spliterator -
Methods inherited from class it.unibo.alchemist.model.interfaces.Node
cloneNode -
Methods inherited from class java.lang.Iterable
iterator, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CellNodeImpl
CellNodeImpl(Environment<Double, P> env, double diameter)
create a new cell node.- Parameters:
env- the environmentdiameter- the diameter
-
CellNodeImpl
CellNodeImpl(Environment<Double, P> env)
- Parameters:
env- the environment
-
-
Method Detail
-
getDiameter
final double getDiameter()
-
getPolarizationVersor
final P getPolarizationVersor()
-
setConcentration
final void setConcentration(Molecule mol, Double c)
-
setPolarization
final void setPolarization(P v)
set the polarization versor, e.g. a versor indicating the direction in which the cell will move the next time.
- Parameters:
v- The Position representing the new polarization versor.
-
addPolarization
final void addPolarization(P v)
add v to the polarization versor inside the cell; useful for considering the combination of various stimuli in a cell.
- Parameters:
v- polarization direction
-
addJunction
final void addJunction(Junction j, CellNode<out Object> neighbor)
Add a junction to the current node.
- Parameters:
j- the junctionneighbor- the neighbor node at the other side of the junction
-
containsJunction
final boolean containsJunction(Junction j)
Return true if a junction is present in the current node, false otherwise. Note: a junction is considered present if the method junction.equals(j) return true.
- Parameters:
j- the junction
-
removeJunction
final void removeJunction(Junction j, CellNode<out Object> neighbor)
Remove a junction from this node.
- Parameters:
j- the junction to removeneighbor- the node at the other side of the junction.
-
getNeighborsLinkWithJunction
final Set<CellNode<out Object>> getNeighborsLinkWithJunction(Junction j)
Returns a set of ICellNode which are linked with the current node by a junction of the type j.
- Parameters:
j- the junction
-
getAllNodesLinkWithJunction
final Set<CellNode<out Object>> getAllNodesLinkWithJunction()
-
getJunctionsCount
final int getJunctionsCount()
-
getRadius
final double getRadius()
-
-
-
-