org.schmant.run
Class AlreadySatisfiedTaskDependency
java.lang.Object
java.util.Observable
org.schmant.run.AlreadySatisfiedTaskDependency
- All Implemented Interfaces:
- TaskDependency
public class AlreadySatisfiedTaskDependency
- extends Observable
- implements TaskDependency
This task dependency is already satisfied! It can be used when scheduling a
task that might have had but did not have dependencies.
- Since:
- 0.8
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final AlreadySatisfiedTaskDependency INSTANCE
- This singleton instance may be used instead of instantiating this class.
AlreadySatisfiedTaskDependency
public AlreadySatisfiedTaskDependency()
getDependencyObservable
public Observable getDependencyObservable()
- Get an observable for this dependency. Note that this observable will
never notify its observers since this dependency is already satisfied.
- Specified by:
getDependencyObservable
in interface TaskDependency
- Returns:
- An
Observable
to observe.
getSatisfiedStateLock
public Lock getSatisfiedStateLock()
- This method returns a dummy lock.
- Specified by:
getSatisfiedStateLock
in interface TaskDependency
- Returns:
- The lock used to protect the satisfied state.
- See Also:
TaskDependency.isSatisfied()
isSatisfied
public boolean isSatisfied()
- This method always returns
true
.
- Specified by:
isSatisfied
in interface TaskDependency
- Returns:
true
if the dependency is satisfied.