-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.ILsaNode,it.unibo.alchemist.model.interfaces.Node,it.unibo.alchemist.model.interfaces.Node,java.io.Serializable,java.lang.Comparable,java.lang.Iterable
public final class LsaNode extends AbstractNode<List<ILsaMolecule>> implements ILsaNode
This class realizes a node with LSA concentration.
-
-
Constructor Summary
Constructors Constructor Description LsaNode(Environment<List<ILsaMolecule>, out Object> env)
-
Method Summary
Modifier and Type Method Description booleancontains(Molecule m)intgetMoleculeCount()List<ILsaMolecule>getConcentration(Molecule m)Map<Molecule, List<ILsaMolecule>>getContents()List<ILsaMolecule>getLsaSpace()booleanremoveConcentration(ILsaMolecule matchedInstance)Deletes an ILsaMolecule from the Node LsaSpace Warning: the method removes only the first matched ILsaMolecule. voidsetConcentration(ILsaMolecule inst)Adds an instance of ILsaMolecule in the node's LsaSpace. voidsetConcentration(Molecule mol, List<ILsaMolecule> c)StringtoString()-
Methods inherited from class it.unibo.alchemist.model.implementations.nodes.AbstractNode
addReaction, cloneNode, compareTo, equals, forEach, getId, 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
-
LsaNode
LsaNode(Environment<List<ILsaMolecule>, out Object> env)
- Parameters:
env- The environment (used for safe node id computation)
-
-
Method Detail
-
getMoleculeCount
int getMoleculeCount()
-
getConcentration
List<ILsaMolecule> getConcentration(Molecule m)
-
getContents
Map<Molecule, List<ILsaMolecule>> getContents()
-
getLsaSpace
List<ILsaMolecule> getLsaSpace()
-
removeConcentration
boolean removeConcentration(ILsaMolecule matchedInstance)
Deletes an ILsaMolecule from the Node LsaSpace Warning: the method removes only the first matched ILsaMolecule.
- Parameters:
matchedInstance- the molecule you want to remove
-
setConcentration
void setConcentration(ILsaMolecule inst)
Adds an instance of ILsaMolecule in the node's LsaSpace.
- Parameters:
inst- the molecule you want to add
-
setConcentration
void setConcentration(Molecule mol, List<ILsaMolecule> c)
-
-
-
-