Package edu.wpi.first.networktables
Class NetworkTableValue
java.lang.Object
edu.wpi.first.networktables.NetworkTableValue
public final class NetworkTableValue extends Object
A network table entry value.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object other)
boolean
getBoolean()
Get the entry's boolean value.boolean[]
getBooleanArray()
Get the entry's boolean array value.double
getDouble()
Get the entry's double value.double[]
getDoubleArray()
Get the entry's double array value.byte[]
getRaw()
Get the entry's raw value.byte[]
getRpc()
Get the entry's rpc definition value.String
getString()
Get the entry's string value.String[]
getStringArray()
Get the entry's string array value.long
getTime()
Get the creation time of the value.NetworkTableType
getType()
Get the data type.Object
getValue()
Get the data value stored.int
hashCode()
boolean
isBoolean()
Determine if entry value contains a boolean.boolean
isBooleanArray()
Determine if entry value contains a boolean array.boolean
isDouble()
Determine if entry value contains a double.boolean
isDoubleArray()
Determine if entry value contains a double array.boolean
isRaw()
Determine if entry value contains a raw.boolean
isRpc()
Determine if entry value contains a rpc definition.boolean
isString()
Determine if entry value contains a string.boolean
isStringArray()
Determine if entry value contains a string array.boolean
isValid()
Determine if entry value contains a value or is unassigned.static NetworkTableValue
makeBoolean(boolean value)
Creates a boolean entry value.static NetworkTableValue
makeBoolean(boolean value, long time)
Creates a boolean entry value.static NetworkTableValue
makeBooleanArray(boolean[] value)
Creates a boolean array entry value.static NetworkTableValue
makeBooleanArray(boolean[] value, long time)
Creates a boolean array entry value.static NetworkTableValue
makeBooleanArray(Boolean[] value)
Creates a boolean array entry value.static NetworkTableValue
makeBooleanArray(Boolean[] value, long time)
Creates a boolean array entry value.static NetworkTableValue
makeDouble(double value)
Creates a double entry value.static NetworkTableValue
makeDouble(double value, long time)
Creates a double entry value.static NetworkTableValue
makeDoubleArray(double[] value)
Creates a double array entry value.static NetworkTableValue
makeDoubleArray(double[] value, long time)
Creates a double array entry value.static NetworkTableValue
makeDoubleArray(Number[] value)
Creates a double array entry value.static NetworkTableValue
makeDoubleArray(Number[] value, long time)
Creates a double array entry value.static NetworkTableValue
makeRaw(byte[] value)
Creates a raw entry value.static NetworkTableValue
makeRaw(byte[] value, long time)
Creates a raw entry value.static NetworkTableValue
makeRpc(byte[] value)
Creates a rpc entry value.static NetworkTableValue
makeRpc(byte[] value, long time)
Creates a rpc entry value.static NetworkTableValue
makeString(String value)
Creates a string entry value.static NetworkTableValue
makeString(String value, long time)
Creates a string entry value.static NetworkTableValue
makeStringArray(String[] value)
Creates a string array entry value.static NetworkTableValue
makeStringArray(String[] value, long time)
Creates a string array entry value.
-
Method Details
-
getType
Get the data type.- Returns:
- The type.
-
getValue
Get the data value stored.- Returns:
- The type.
-
getTime
Get the creation time of the value.- Returns:
- The time, in the units returned by NetworkTablesJNI.now().
-
isValid
Determine if entry value contains a value or is unassigned.- Returns:
- True if the entry value contains a value.
-
isBoolean
Determine if entry value contains a boolean.- Returns:
- True if the entry value is of boolean type.
-
isDouble
Determine if entry value contains a double.- Returns:
- True if the entry value is of double type.
-
isString
Determine if entry value contains a string.- Returns:
- True if the entry value is of string type.
-
isRaw
Determine if entry value contains a raw.- Returns:
- True if the entry value is of raw type.
-
isRpc
Determine if entry value contains a rpc definition.- Returns:
- True if the entry value is of rpc definition type.
-
isBooleanArray
Determine if entry value contains a boolean array.- Returns:
- True if the entry value is of boolean array type.
-
isDoubleArray
Determine if entry value contains a double array.- Returns:
- True if the entry value is of double array type.
-
isStringArray
Determine if entry value contains a string array.- Returns:
- True if the entry value is of string array type.
-
getBoolean
Get the entry's boolean value.- Returns:
- The boolean value.
- Throws:
ClassCastException
- if the entry value is not of boolean type.
-
getDouble
Get the entry's double value.- Returns:
- The double value.
- Throws:
ClassCastException
- if the entry value is not of double type.
-
getString
Get the entry's string value.- Returns:
- The string value.
- Throws:
ClassCastException
- if the entry value is not of string type.
-
getRaw
Get the entry's raw value.- Returns:
- The raw value.
- Throws:
ClassCastException
- if the entry value is not of raw type.
-
getRpc
Get the entry's rpc definition value.- Returns:
- The rpc definition value.
- Throws:
ClassCastException
- if the entry value is not of rpc definition type.
-
getBooleanArray
Get the entry's boolean array value.- Returns:
- The boolean array value.
- Throws:
ClassCastException
- if the entry value is not of boolean array type.
-
getDoubleArray
Get the entry's double array value.- Returns:
- The double array value.
- Throws:
ClassCastException
- if the entry value is not of double array type.
-
getStringArray
Get the entry's string array value.- Returns:
- The string array value.
- Throws:
ClassCastException
- if the entry value is not of string array type.
-
makeBoolean
Creates a boolean entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeBoolean
Creates a boolean entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeDouble
Creates a double entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeDouble
Creates a double entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeString
Creates a string entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeString
Creates a string entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeRaw
Creates a raw entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeRaw
Creates a raw entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeRpc
Creates a rpc entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeRpc
Creates a rpc entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeBooleanArray
Creates a boolean array entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeBooleanArray
Creates a boolean array entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeBooleanArray
Creates a boolean array entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeBooleanArray
Creates a boolean array entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeDoubleArray
Creates a double array entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeDoubleArray
Creates a double array entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeDoubleArray
Creates a double array entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeDoubleArray
Creates a double array entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
makeStringArray
Creates a string array entry value.- Parameters:
value
- the value- Returns:
- The entry value
-
makeStringArray
Creates a string array entry value.- Parameters:
value
- the valuetime
- the creation time to use (instead of the current time)- Returns:
- The entry value
-
equals
-
hashCode
-