-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d1500f
commit cf869b5
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
procedural/constraints/src/main/kotlin/gov/nasa/jpl/aerie/constraints/Constraint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package gov.nasa.jpl.aerie.constraints | ||
|
||
import gov.nasa.jpl.aerie.timeline.CollectOptions | ||
import gov.nasa.jpl.aerie.timeline.plan.Plan | ||
|
||
/** The interface that all constraints must satisfy. */ | ||
interface Constraint { | ||
/** | ||
* Run the constraint on a plan. | ||
* | ||
* The provided collect options are the options that the [Violations] result will be collected on after | ||
* the constraint is run. The constraint does not need to use the options unless it collects a timeline prematurely. | ||
* | ||
* @param plan the plan to check the constraint on | ||
* @param options the [CollectOptions] that the result will be collected with | ||
*/ | ||
fun run(plan: Plan, options: CollectOptions): Violations | ||
} |