SingleRunAction

public class SingleRunAction

This is the SingleRunAction class. It handles running Runnables once, until a reset is called. It also forms the basis of the PathCallback class. Basically, if you want to run a certain action once despite looping through a section of code multiple times, then this is for you.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Inheritors

Constructors

Link copied to clipboard
public void SingleRunAction(Runnable runnable)
This creates a new SingleRunAction with a Runnable containing the code to be run for this action.

Functions

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.