|
RobotCore 1.0
WPILib port to raspberry Pi
|
Public Member Functions | |
| EventLoop () | |
| void | bind (Runnable action) |
| void | bindWeak (Runnable action) |
| boolean | isBound (Runnable action) |
| void | unbind (Runnable action) |
| void | poll () |
| void | clear () |
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition at line 14 of file EventLoop.java.
| org.wpilib.event.EventLoop.EventLoop | ( | ) |
Default constructor.
Definition at line 22 of file EventLoop.java.
| void org.wpilib.event.EventLoop.bind | ( | Runnable | action | ) |
Bind a new action to run when the loop is polled. The event loop keeps a reference to the action, which will prevent it from being garbage collected. If memory leaks are a concern, consider bindWeak(Runnable).
| action | the action to run. |
Definition at line 31 of file EventLoop.java.
| void org.wpilib.event.EventLoop.bindWeak | ( | Runnable | action | ) |
Weakly binds a new action to run when the loop is polled. Unlike bind(Runnable), a weakly bound action will not be prevented from being garbage collected.
| action | the action to run |
Definition at line 45 of file EventLoop.java.
| void org.wpilib.event.EventLoop.clear | ( | ) |
Clear all bindings.
Definition at line 88 of file EventLoop.java.
| boolean org.wpilib.event.EventLoop.isBound | ( | Runnable | action | ) |
Checks if an action is bound to the event loop.
| action | the action to check |
Definition at line 58 of file EventLoop.java.
| void org.wpilib.event.EventLoop.poll | ( | ) |
Poll all bindings.
Definition at line 78 of file EventLoop.java.
| void org.wpilib.event.EventLoop.unbind | ( | Runnable | action | ) |
Unbind an action from running when the loop is polled. Has no effect if the given action is not already bound.
| action | the action to unbind. |
Definition at line 68 of file EventLoop.java.