PathCallback

public class PathCallback extends SingleRunAction

This is the PathCallback class. This class handles callbacks of Runnables in PathChains. Basically, this allows you to run non-blocking code in the middle of PathChains.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void PathCallback(double startCondition, Runnable runnable, int type, int index)
This creates a new PathCallback with a specified start condition (either time or parametric), a Runnable of code to run (preferably a lambda statement), a type (using the class constants), and an index for which Path within a PathChain the callback is to run on.

Properties

Link copied to clipboard
public int index
Link copied to clipboard
public final static int PARAMETRIC
Link copied to clipboard
public double startCondition
Link copied to clipboard
public final static int TIME
Link copied to clipboard
public int type

Functions

Link copied to clipboard
public int getIndex()
This returns the index of which Path the callback is to run on within the PathChain.
Link copied to clipboard
public double getStartCondition()
This returns the start condition for this callback.
Link copied to clipboard
public int getType()
This returns the type of callback this is (time or parametric).
Link copied to clipboard
public boolean hasBeenRun()
This returns if the SingleRunAction has been run yet.
Link copied to clipboard
public void reset()
This resets the SingleRunAction and makes it able to run again.
Link copied to clipboard
public boolean run()
This runs the Runnable of the SingleRunAction.