Interface Dependency

  • All Implemented Interfaces:
    java.io.Serializable

    
    public interface Dependency
     implements Serializable
                        

    This interface represents a token that may generate a dependency between two reactions. Some special built-in tokens are EVERYTHING, EVERY_MOLECULE, MOVEMENT, and NEIGHBORHOOD_CHANGE. Molecules are dependencies as well.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      boolean dependsOn(Dependency dependency) Determines whether this dependency depends on the provided dependency.
      boolean makesDependent(Dependency dependency) Determines whether the provided dependency depends on this dependency.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • dependsOn

         boolean dependsOn(Dependency dependency)

        Determines whether this dependency depends on the provided dependency. The default behavior requires equality.

        Parameters:
        dependency - the dependency
        Returns:

        true if this dependency generates a dependency with the provided one

      • makesDependent

         boolean makesDependent(Dependency dependency)

        Determines whether the provided dependency depends on this dependency. The default behavior calls dependsOn, and provides a bidirectional dependency.

        Parameters:
        dependency - the dependency
        Returns:

        true if this dependency generates a dependency with the provided one