Class NetworkTableValue


  • public final class NetworkTableValue
    extends Object
    A network table entry value.
    • Method Detail

      • getType

        public NetworkTableType getType()
        Get the data type.
        Returns:
        The type.
      • getValue

        public Object getValue()
        Get the data value stored.
        Returns:
        The type.
      • getTime

        public long getTime()
        Get the creation time of the value.
        Returns:
        The time, in the units returned by NetworkTablesJNI.now().
      • isValid

        public boolean isValid()
        Determine if entry value contains a value or is unassigned.
        Returns:
        True if the entry value contains a value.
      • isBoolean

        public boolean isBoolean()
        Determine if entry value contains a boolean.
        Returns:
        True if the entry value is of boolean type.
      • isDouble

        public boolean isDouble()
        Determine if entry value contains a double.
        Returns:
        True if the entry value is of double type.
      • isString

        public boolean isString()
        Determine if entry value contains a string.
        Returns:
        True if the entry value is of string type.
      • isRaw

        public boolean isRaw()
        Determine if entry value contains a raw.
        Returns:
        True if the entry value is of raw type.
      • isRpc

        public boolean isRpc()
        Determine if entry value contains a rpc definition.
        Returns:
        True if the entry value is of rpc definition type.
      • isBooleanArray

        public boolean isBooleanArray()
        Determine if entry value contains a boolean array.
        Returns:
        True if the entry value is of boolean array type.
      • isDoubleArray

        public boolean isDoubleArray()
        Determine if entry value contains a double array.
        Returns:
        True if the entry value is of double array type.
      • isStringArray

        public boolean isStringArray()
        Determine if entry value contains a string array.
        Returns:
        True if the entry value is of string array type.
      • getBoolean

        public boolean getBoolean()
        Get the entry's boolean value.
        Returns:
        The boolean value.
        Throws:
        ClassCastException - if the entry value is not of boolean type.
      • getDouble

        public double getDouble()
        Get the entry's double value.
        Returns:
        The double value.
        Throws:
        ClassCastException - if the entry value is not of double type.
      • getString

        public String getString()
        Get the entry's string value.
        Returns:
        The string value.
        Throws:
        ClassCastException - if the entry value is not of string type.
      • getRaw

        public byte[] getRaw()
        Get the entry's raw value.
        Returns:
        The raw value.
        Throws:
        ClassCastException - if the entry value is not of raw type.
      • getRpc

        public byte[] 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

        public boolean[] 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

        public double[] 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

        public String[] 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

        public static NetworkTableValue makeBoolean​(boolean value)
        Creates a boolean entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeBoolean

        public static NetworkTableValue makeBoolean​(boolean value,
                                                    long time)
        Creates a boolean entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeDouble

        public static NetworkTableValue makeDouble​(double value)
        Creates a double entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeDouble

        public static NetworkTableValue makeDouble​(double value,
                                                   long time)
        Creates a double entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeString

        public static NetworkTableValue makeString​(String value)
        Creates a string entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeString

        public static NetworkTableValue makeString​(String value,
                                                   long time)
        Creates a string entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeRaw

        public static NetworkTableValue makeRaw​(byte[] value)
        Creates a raw entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeRaw

        public static NetworkTableValue makeRaw​(byte[] value,
                                                long time)
        Creates a raw entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeRpc

        public static NetworkTableValue makeRpc​(byte[] value)
        Creates a rpc entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeRpc

        public static NetworkTableValue makeRpc​(byte[] value,
                                                long time)
        Creates a rpc entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeBooleanArray

        public static NetworkTableValue makeBooleanArray​(boolean[] value)
        Creates a boolean array entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeBooleanArray

        public static NetworkTableValue makeBooleanArray​(boolean[] value,
                                                         long time)
        Creates a boolean array entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeBooleanArray

        public static NetworkTableValue makeBooleanArray​(Boolean[] value)
        Creates a boolean array entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeBooleanArray

        public static NetworkTableValue makeBooleanArray​(Boolean[] value,
                                                         long time)
        Creates a boolean array entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeDoubleArray

        public static NetworkTableValue makeDoubleArray​(double[] value)
        Creates a double array entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeDoubleArray

        public static NetworkTableValue makeDoubleArray​(double[] value,
                                                        long time)
        Creates a double array entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeDoubleArray

        public static NetworkTableValue makeDoubleArray​(Number[] value)
        Creates a double array entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeDoubleArray

        public static NetworkTableValue makeDoubleArray​(Number[] value,
                                                        long time)
        Creates a double array entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • makeStringArray

        public static NetworkTableValue makeStringArray​(String[] value)
        Creates a string array entry value.
        Parameters:
        value - the value
        Returns:
        The entry value
      • makeStringArray

        public static NetworkTableValue makeStringArray​(String[] value,
                                                        long time)
        Creates a string array entry value.
        Parameters:
        value - the value
        time - the creation time to use (instead of the current time)
        Returns:
        The entry value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object