Class Tunables.TunableBoolean

java.lang.Object
org.team1126.lib.tunable.Tunables.TunableBoolean
Enclosing class:
Tunables

public static final class Tunables.TunableBoolean extends Object
A tunable boolean value. Can be modified via NetworkTables.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListener(edu.wpi.first.util.function.BooleanConsumer onChange)
    Adds a listener that will be invoked when the tunable's value is modified.
    boolean
    get()
    Returns the value of the tunable.
    void
     
    void
    set(boolean value)
    Sets the value of the tunable.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public boolean get()
      Returns the value of the tunable.
    • set

      public void set(boolean value)
      Sets the value of the tunable.
      Parameters:
      value - The new value.
    • addListener

      public void addListener(edu.wpi.first.util.function.BooleanConsumer onChange)
      Adds a listener that will be invoked when the tunable's value is modified. Will no-op if the listener is null.
      Parameters:
      onChange - A consumer that is invoked when the value of the tunable is modified.
    • poll

      public void poll()