Package it.unibo.alchemist.model
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.
-
-
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. -
-
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
-
-
-
-