Class LogTable

java.lang.Object
org.littletonrobotics.junction.LogTable

public class LogTable extends Object
A table of logged data in allowable types. Can reference another higher level table.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Represents all possible data types that can be logged.
    static class 
    Represents a value stored in a LogTable, including type and value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LogTable(long timestamp)
    Creates a new LogTable, to serve as the root table.
  • Method Summary

    Modifier and Type
    Method
    Description
    static LogTable
    clone(LogTable source)
    Creates a new LogTable, copying data from the given source.
    get(String key)
    Reads a generic value from the table.
    boolean
    get(String key, boolean defaultValue)
    Reads a Boolean value from the table.
    boolean[]
    get(String key, boolean[] defaultValue)
    Reads a BooleanArray value from the table.
    boolean[][]
    get(String key, boolean[][] defaultValue)
    Reads a 2D BooleanArray value from the table.
    byte[]
    get(String key, byte[] defaultValue)
    Reads a Raw value from the table.
    byte[][]
    get(String key, byte[][] defaultValue)
    Reads a 2D Raw value from the table.
    double
    get(String key, double defaultValue)
    Reads a Double value from the table.
    double[]
    get(String key, double[] defaultValue)
    Reads a DoubleArray value from the table.
    double[][]
    get(String key, double[][] defaultValue)
    Reads a 2D DoubleArray value from the table.
    float
    get(String key, float defaultValue)
    Reads a Float value from the table.
    float[]
    get(String key, float[] defaultValue)
    Reads a FloatArray value from the table.
    float[][]
    get(String key, float[][] defaultValue)
    Reads a 2D FloatArray value from the table.
    int
    get(String key, int defaultValue)
    Reads an Integer value from the table.
    int[]
    get(String key, int[] defaultValue)
    Reads an IntegerArray value from the table.
    int[][]
    get(String key, int[][] defaultValue)
    Reads a 2D IntegerArray value from the table.
    long
    get(String key, long defaultValue)
    Reads an Integer value from the table.
    long[]
    get(String key, long[] defaultValue)
    Reads an IntegerArray value from the table.
    long[][]
    get(String key, long[][] defaultValue)
    Reads a 2D IntegerArray value from the table.
    <E extends Enum<E>>
    E
    get(String key, E defaultValue)
    Reads an enum value from the table.
    <E extends Enum<E>>
    E[]
    get(String key, E[] defaultValue)
    Reads an enum array value from the table.
    <E extends Enum<E>>
    E[][]
    get(String key, E[][] defaultValue)
    Reads a 2D enum array value from the table.
    <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
    T
    get(String key, Protobuf<T,MessageType> proto, T defaultValue)
    Reads a protobuf value from the table.
    <T> T
    get(String key, Struct<T> struct, T defaultValue)
    Reads a struct value from the table.
    <T> T[]
    get(String key, Struct<T> struct, T... defaultValue)
    Reads a struct array value from the table.
    <T> T[][]
    get(String key, Struct<T> struct, T[][] defaultValue)
    Reads a 2D struct array value from the table.
    get(String key, Color defaultValue)
    Reads a Color value from the table.
    get(String key, String defaultValue)
    Reads a String value from the table.
    get(String key, String[] defaultValue)
    Reads a StringArray value from the table.
    String[][]
    get(String key, String[][] defaultValue)
    Reads a 2D StringArray value from the table.
    <U extends Unit, M extends Measure<U>>
    M
    get(String key, M defaultValue)
    Reads a Measure value from the table.
    <R extends Record>
    R
    get(String key, R defaultValue)
    Reads a serialized record value from the table.
    <R extends Record>
    R[]
    get(String key, R... defaultValue)
    Reads a serialized record array value from the table.
    <R extends Record>
    R[][]
    get(String key, R[][] defaultValue)
    Reads a serialized 2D record array value from the table.
    <T extends LoggableInputs>
    T
    get(String key, T defaultValue)
    Reads a LoggableInput subtable from the table.
    <T extends StructSerializable>
    T[]
    get(String key, T... defaultValue)
    Reads a serialized (struct) array value from the table.
    <T extends StructSerializable>
    T[][]
    get(String key, T[][] defaultValue)
    Reads a serialized 2D (struct) array value from the table.
    getAll(boolean subtableOnly)
    Returns a set of all values from the table.
    getSubtable(String tableName)
    Creates a new LogTable for referencing a single subtable.
    long
    Returns the timestamp of the table.
    void
    put(String key, boolean value)
    Writes a new Boolean value to the table.
    void
    put(String key, boolean[] value)
    Writes a new BooleanArray value to the table.
    void
    put(String key, boolean[][] value)
    Writes a new 2D BooleanArray value to the table.
    void
    put(String key, byte[] value)
    Writes a new Raw value to the table.
    void
    put(String key, byte[][] value)
    Writes a new 2D Raw value to the table.
    void
    put(String key, double value)
    Writes a new Double value to the table.
    void
    put(String key, double[] value)
    Writes a new DoubleArray value to the table.
    void
    put(String key, double[][] value)
    Writes a new 2D DoubleArray value to the table.
    void
    put(String key, double value, String unit)
    Writes a new Double value to the table with units.
    void
    put(String key, float value)
    Writes a new Float value to the table.
    void
    put(String key, float[] value)
    Writes a new FloatArray value to the table.
    void
    put(String key, float[][] value)
    Writes a new 2D FloatArray value to the table.
    void
    put(String key, float value, String unit)
    Writes a new Float value to the table with units.
    void
    put(String key, int value)
    Writes a new Integer value to the table.
    void
    put(String key, int[] value)
    Writes a new IntegerArray value to the table.
    void
    put(String key, int[][] value)
    Writes a new 2D IntegerArray value to the table.
    void
    put(String key, long value)
    Writes a new Integer value to the table.
    void
    put(String key, long[] value)
    Writes a new IntegerArray value to the table.
    void
    put(String key, long[][] value)
    Writes a new 2D IntegerArray value to the table.
    <E extends Enum<E>>
    void
    put(String key, E value)
    Writes a new enum value to the table.
    <E extends Enum<E>>
    void
    put(String key, E[] value)
    Writes a new enum array value to the table.
    <E extends Enum<E>>
    void
    put(String key, E[][] value)
    Writes a new 2D enum array value to the table.
    <U extends Unit>
    void
    put(String key, Measure<U> value)
    Writes a new Measure value to the table.
    <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>>
    void
    put(String key, Protobuf<T,MessageType> proto, T value)
    Writes a new protobuf value to the table.
    <T> void
    put(String key, Struct<T> struct, T value)
    Writes a new struct value to the table.
    <T> void
    put(String key, Struct<T> struct, T... value)
    Writes a new struct array value to the table.
    <T> void
    put(String key, Struct<T> struct, T[][] value)
    Writes a new 2D struct array value to the table.
    void
    put(String key, Color value)
    Writes a new Color value to the table.
    void
    put(String key, String value)
    Writes a new String value to the table.
    void
    put(String key, String[] value)
    Writes a new StringArray value to the table.
    void
    put(String key, String[][] value)
    Writes a new 2D StringArray value to the table.
    void
    Writes a new generic value to the table.
    <R extends Record>
    void
    put(String key, R value)
    Writes a new auto serialized record value to the table.
    <R extends Record>
    void
    put(String key, R... value)
    Writes a new auto serialized record array value to the table.
    <R extends Record>
    void
    put(String key, R[][] value)
    Writes a new auto serialized 2D record array value to the table.
    <T extends LoggableInputs>
    void
    put(String key, T value)
    Writes a new LoggableInput subtable to the table.
    <T extends StructSerializable>
    void
    put(String key, T... value)
    Writes a new auto serialized array value to the table.
    <T extends StructSerializable>
    void
    put(String key, T[][] value)
    Writes a new auto serialized 2D array value to the table.
    void
    setTimestamp(long timestamp)
    Updates the timestamp of the table.
    Returns a string representation of the table.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LogTable

      public LogTable(long timestamp)
      Creates a new LogTable, to serve as the root table.
      Parameters:
      timestamp - The timestamp for the table.
  • Method Details

    • clone

      public static LogTable clone(LogTable source)
      Creates a new LogTable, copying data from the given source. The original table can be safely modified without affecting the copy.
      Parameters:
      source - The source table.
      Returns:
      The new table.
    • setTimestamp

      public void setTimestamp(long timestamp)
      Updates the timestamp of the table.
      Parameters:
      timestamp - The new timestamp.
    • getTimestamp

      public long getTimestamp()
      Returns the timestamp of the table.
      Returns:
      The timestamp.
    • getSubtable

      public LogTable getSubtable(String tableName)
      Creates a new LogTable for referencing a single subtable. Modifications to the subtable will be reflected in the original object.
      Parameters:
      tableName - The name of the subtable. Do not include a trailing slash.
      Returns:
      The subtable object.
    • getAll

      public Map<String,LogTable.LogValue> getAll(boolean subtableOnly)
      Returns a set of all values from the table. If reading a single subtable, the data will be a copy. Otherwise, it will be a reference.
      Parameters:
      subtableOnly - If true, include only values in the subtable (no prefix). If false, include all values.
      Returns:
      Map of the requested data.
    • put

      public void put(String key, LogTable.LogValue value)
      Writes a new generic value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, byte[] value)
      Writes a new Raw value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, byte[][] value)
      Writes a new 2D Raw value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, boolean value)
      Writes a new Boolean value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, boolean[] value)
      Writes a new BooleanArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, boolean[][] value)
      Writes a new 2D BooleanArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, int value)
      Writes a new Integer value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, int[] value)
      Writes a new IntegerArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, int[][] value)
      Writes a new 2D IntegerArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, long value)
      Writes a new Integer value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, long[] value)
      Writes a new IntegerArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, long[][] value)
      Writes a new 2D IntegerArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, float value)
      Writes a new Float value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, float value, String unit)
      Writes a new Float value to the table with units. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
      unit - The unit to save as metadata.
    • put

      public void put(String key, float[] value)
      Writes a new FloatArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, float[][] value)
      Writes a new 2D FloatArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, double value)
      Writes a new Double value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, double value, String unit)
      Writes a new Double value to the table with units. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
      unit - The unit to save as metadata.
    • put

      public void put(String key, double[] value)
      Writes a new DoubleArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, double[][] value)
      Writes a new 2D DoubleArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, String value)
      Writes a new String value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, String[] value)
      Writes a new StringArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, String[][] value)
      Writes a new 2D StringArray value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <E extends Enum<E>> void put(String key, E value)
      Writes a new enum value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <E extends Enum<E>> void put(String key, E[] value)
      Writes a new enum array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <E extends Enum<E>> void put(String key, E[][] value)
      Writes a new 2D enum array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <U extends Unit> void put(String key, Measure<U> value)
      Writes a new Measure value to the table. Skipped if the key already exists as a different type.

      This overload always records the value in its base unit. Use the double overload with a unit string to record values with alternative units.

      Type Parameters:
      U - The unit type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public void put(String key, Color value)
      Writes a new Color value to the table. Skipped if the key already exists as a different type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <T extends LoggableInputs> void put(String key, T value)
      Writes a new LoggableInput subtable to the table.
      Type Parameters:
      T - The input type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <T> void put(String key, Struct<T> struct, T value)
      Writes a new struct value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      value - The field value.
    • put

      public <T> void put(String key, Struct<T> struct, T... value)
      Writes a new struct array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      value - The field value.
    • put

      public <T> void put(String key, Struct<T> struct, T[][] value)
      Writes a new 2D struct array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      value - The field value.
    • put

      public <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> void put(String key, Protobuf<T,MessageType> proto, T value)
      Writes a new protobuf value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The value type.
      MessageType - The protobuf message type.
      Parameters:
      key - The field name.
      proto - The protobuf serialization object.
      value - The field value.
    • put

      public <T extends WPISerializable> void put(String key, T value)
      Writes a new auto serialized value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <T extends StructSerializable> void put(String key, T... value)
      Writes a new auto serialized array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <T extends StructSerializable> void put(String key, T[][] value)
      Writes a new auto serialized 2D array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <R extends Record> void put(String key, R value)
      Writes a new auto serialized record value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <R extends Record> void put(String key, R... value)
      Writes a new auto serialized record array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      value - The field value.
    • put

      public <R extends Record> void put(String key, R[][] value)
      Writes a new auto serialized 2D record array value to the table. Skipped if the key already exists as a different type.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      value - The field value.
    • get

      public LogTable.LogValue get(String key)
      Reads a generic value from the table.
      Parameters:
      key - The field name.
      Returns:
      The field value.
    • get

      public byte[] get(String key, byte[] defaultValue)
      Reads a Raw value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public byte[][] get(String key, byte[][] defaultValue)
      Reads a 2D Raw value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public boolean get(String key, boolean defaultValue)
      Reads a Boolean value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public boolean[] get(String key, boolean[] defaultValue)
      Reads a BooleanArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public boolean[][] get(String key, boolean[][] defaultValue)
      Reads a 2D BooleanArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public int get(String key, int defaultValue)
      Reads an Integer value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public int[] get(String key, int[] defaultValue)
      Reads an IntegerArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public int[][] get(String key, int[][] defaultValue)
      Reads a 2D IntegerArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public long get(String key, long defaultValue)
      Reads an Integer value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public long[] get(String key, long[] defaultValue)
      Reads an IntegerArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public long[][] get(String key, long[][] defaultValue)
      Reads a 2D IntegerArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public float get(String key, float defaultValue)
      Reads a Float value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public float[] get(String key, float[] defaultValue)
      Reads a FloatArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public float[][] get(String key, float[][] defaultValue)
      Reads a 2D FloatArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public double get(String key, double defaultValue)
      Reads a Double value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public double[] get(String key, double[] defaultValue)
      Reads a DoubleArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public double[][] get(String key, double[][] defaultValue)
      Reads a 2D DoubleArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public String get(String key, String defaultValue)
      Reads a String value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public String[] get(String key, String[] defaultValue)
      Reads a StringArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public String[][] get(String key, String[][] defaultValue)
      Reads a 2D StringArray value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <E extends Enum<E>> E get(String key, E defaultValue)
      Reads an enum value from the table.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <E extends Enum<E>> E[] get(String key, E[] defaultValue)
      Reads an enum array value from the table.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <E extends Enum<E>> E[][] get(String key, E[][] defaultValue)
      Reads a 2D enum array value from the table.
      Type Parameters:
      E - The enum type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <U extends Unit, M extends Measure<U>> M get(String key, M defaultValue)
      Reads a Measure value from the table.
      Type Parameters:
      U - The unit type.
      M - The measure type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <U extends Unit, Base extends Measure<U>, M extends MutableMeasure<U, Base, M>> M get(String key, M value)
      Reads a MutableMeasure value from the table.

      Unlike other "get" methods, this method mutates the provided value instead of returning a new instance. The object returned from this method is the same instance as the provided value.

      Type Parameters:
      U - The unit type.
      Base - The base unit type
      M - The measure type.
      Parameters:
      key - The field name.
      value - The field value, to be mutated.
      Returns:
      The field value.
    • get

      public Color get(String key, Color defaultValue)
      Reads a Color value from the table.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T extends LoggableInputs> T get(String key, T defaultValue)
      Reads a LoggableInput subtable from the table.
      Type Parameters:
      T - The input type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T> T get(String key, Struct<T> struct, T defaultValue)
      Reads a struct value from the table.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T> T[] get(String key, Struct<T> struct, T... defaultValue)
      Reads a struct array value from the table.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T> T[][] get(String key, Struct<T> struct, T[][] defaultValue)
      Reads a 2D struct array value from the table.
      Type Parameters:
      T - The struct type.
      Parameters:
      key - The field name.
      struct - The struct serialization object.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T, MessageType extends us.hebi.quickbuf.ProtoMessage<?>> T get(String key, Protobuf<T,MessageType> proto, T defaultValue)
      Reads a protobuf value from the table.
      Type Parameters:
      T - The value type.
      MessageType - The protobuf message type.
      Parameters:
      key - The field name.
      proto - The protobuf serialization object.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T extends WPISerializable> T get(String key, T defaultValue)
      Reads a serialized (struct/protobuf) value from the table.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T extends StructSerializable> T[] get(String key, T... defaultValue)
      Reads a serialized (struct) array value from the table.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <T extends StructSerializable> T[][] get(String key, T[][] defaultValue)
      Reads a serialized 2D (struct) array value from the table.
      Type Parameters:
      T - The object type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <R extends Record> R get(String key, R defaultValue)
      Reads a serialized record value from the table.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <R extends Record> R[] get(String key, R... defaultValue)
      Reads a serialized record array value from the table.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • get

      public <R extends Record> R[][] get(String key, R[][] defaultValue)
      Reads a serialized 2D record array value from the table.
      Type Parameters:
      R - The record type.
      Parameters:
      key - The field name.
      defaultValue - The default field value.
      Returns:
      The field value.
    • toString

      public String toString()
      Returns a string representation of the table.
      Overrides:
      toString in class Object