Package 

Class GenericMoleculePresent

  • All Implemented Interfaces:
    it.unibo.alchemist.model.interfaces.Condition , java.io.Serializable

    
    public class GenericMoleculePresent<T extends Number>
    extends AbstractCondition<T>
                        

    This class implements a condition which checks if a molecule is present or not.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Molecule molecule
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericMoleculePresent(Node<T> n, Molecule mol, T quantity) Builds a new condition, which checks if the molecule exists or not inside the node n.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Molecule getMolecule() Allows to access the molecule.
      Context getContext()
      boolean isValid()
      String toString()
      GenericMoleculePresent<T> cloneCondition(Node<T> node, Reaction<T> reaction)
      double getPropensityContribution() Propensity influence is computed through the binomial coefficient.
      T getQuantity() Allows to access the threshold.
      • Methods inherited from class it.unibo.alchemist.model.implementations.conditions.AbstractCondition

        getInboundDependencies, getNode
      • Methods inherited from class it.unibo.alchemist.model.interfaces.Condition

        reactionReady
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GenericMoleculePresent

        GenericMoleculePresent(Node<T> n, Molecule mol, T quantity)
        Builds a new condition, which checks if the molecule exists or not inside the node n.
        Parameters:
        n - the current node
        mol - the molecule whose presence should be checked
        quantity - the amount of molecules which should be present.