Class Tunable.TunableProtobuf<T>

java.lang.Object
org.wpilib.tunable.TunableBase
org.wpilib.tunable.Tunable<T>
org.wpilib.tunable.Tunable.TunableProtobuf<T>
Type Parameters:
T - value type
All Implemented Interfaces:
Consumer<T>, Supplier<T>
Enclosing class:
Tunable<T>

public static class Tunable.TunableProtobuf<T> extends Tunable<T>
A tunable value serialized with a Protobuf.
  • Method Details

    • set

      public void set(T value)
      Description copied from class: Tunable
      Sets the value.

      Implementations must not throw.

      Specified by:
      set in class Tunable<T>
      Parameters:
      value - value
    • get

      public T get()
      Description copied from class: Tunable
      Gets the value.

      Implementations must not throw.

      Specified by:
      get in interface Supplier<T>
      Specified by:
      get in class Tunable<T>
      Returns:
      value
    • getTypeClass

      public Class<T> getTypeClass()
      Description copied from class: Tunable
      Gets the class of the tunable type. This is used for determining which type handler to use.
      Specified by:
      getTypeClass in class Tunable<T>
      Returns:
      class of the tunable type
    • getProtobuf

      public Protobuf<T,?> getProtobuf()
      Gets the protobuf serializer.
      Returns:
      protobuf serializer