Package org.littletonrobotics.junction
Class LogTable.LogValue
java.lang.Object
org.littletonrobotics.junction.LogTable.LogValue
- Enclosing class:
- LogTable
Represents a value stored in a LogTable, including type and value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe custom type string.final LogTable.LoggableTypeThe log value type.final StringThe name of the unit. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue.Creates a new LogValue. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanReturns the value from the object.booleangetBoolean(boolean defaultValue) Returns the value from the object.boolean[]Returns the value from the object.boolean[]getBooleanArray(boolean[] defaultValue) Returns the value from the object.doubleReturns the value from the object.doublegetDouble(double defaultValue) Returns the value from the object.double[]Returns the value from the object.double[]getDoubleArray(double[] defaultValue) Returns the value from the object.floatgetFloat()Returns the value from the object.floatgetFloat(float defaultValue) Returns the value from the object.float[]Returns the value from the object.float[]getFloatArray(float[] defaultValue) Returns the value from the object.longReturns the value from the object.longgetInteger(long defaultValue) Returns the value from the object.long[]Returns the value from the object.long[]getIntegerArray(long[] defaultValue) Returns the value from the object.Returns the standard string type for NT4.byte[]getRaw()Returns the value from the object.byte[]getRaw(byte[] defaultValue) Returns the value from the object.Returns the value from the object.Returns the value from the object.String[]Returns the value from the object.String[]getStringArray(String[] defaultValue) Returns the value from the object.Returns the standard string type for WPILOGs.inthashCode()
-
Field Details
-
type
The log value type. -
customTypeStr
The custom type string. -
unitStr
The name of the unit.
-
-
Constructor Details
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.unitStr- The unit name, or null if unitless.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.unitStr- The unit name, or null if unitless.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
LogValue
Creates a new LogValue.- Parameters:
value- The value.typeStr- The custom type string, or null for default.
-
-
Method Details
-
getRaw
public byte[] getRaw()Returns the value from the object.- Returns:
- The value.
-
getBoolean
public boolean getBoolean()Returns the value from the object.- Returns:
- The value.
-
getInteger
public long getInteger()Returns the value from the object.- Returns:
- The value.
-
getFloat
public float getFloat()Returns the value from the object.- Returns:
- The value.
-
getDouble
public double getDouble()Returns the value from the object.- Returns:
- The value.
-
getString
Returns the value from the object.- Returns:
- The value.
-
getBooleanArray
public boolean[] getBooleanArray()Returns the value from the object.- Returns:
- The value.
-
getIntegerArray
public long[] getIntegerArray()Returns the value from the object.- Returns:
- The value.
-
getFloatArray
public float[] getFloatArray()Returns the value from the object.- Returns:
- The value.
-
getDoubleArray
public double[] getDoubleArray()Returns the value from the object.- Returns:
- The value.
-
getStringArray
Returns the value from the object.- Returns:
- The value.
-
getRaw
public byte[] getRaw(byte[] defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getBoolean
public boolean getBoolean(boolean defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getInteger
public long getInteger(long defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getFloat
public float getFloat(float defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getDouble
public double getDouble(double defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getString
Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getBooleanArray
public boolean[] getBooleanArray(boolean[] defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getIntegerArray
public long[] getIntegerArray(long[] defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getFloatArray
public float[] getFloatArray(float[] defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getDoubleArray
public double[] getDoubleArray(double[] defaultValue) Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getStringArray
Returns the value from the object.- Parameters:
defaultValue- The default value if the type doesn't match.- Returns:
- The value.
-
getWPILOGType
Returns the standard string type for WPILOGs. Returns the custom type string if not null.- Returns:
- The type string.
-
getNT4Type
Returns the standard string type for NT4. Returns the custom type string if not null.- Returns:
- The type string.
-
equals
-
hashCode
public int hashCode()
-