Package edu.wpi.first.wpilibj.tables
Interface ITable
-
- All Known Implementing Classes:
NetworkTable
@Deprecated public interface ITable
Deprecated.UseNetworkTable
.A table whose values can be read and written to.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NOTIFY_DELETE
Deprecated.static int
NOTIFY_FLAGS
Deprecated.static int
NOTIFY_IMMEDIATE
Deprecated.Notifier flag values.static int
NOTIFY_LOCAL
Deprecated.static int
NOTIFY_NEW
Deprecated.static int
NOTIFY_UPDATE
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addSubTableListener(ITableListener listener)
Deprecated.This will immediately notify the listener of all current sub tablesvoid
addSubTableListener(ITableListener listener, boolean localNotify)
Deprecated.This will immediately notify the listener of all current sub tablesvoid
addTableListener(ITableListener listener)
Deprecated.Add a listener for changes to the tablevoid
addTableListener(ITableListener listener, boolean immediateNotify)
Deprecated.Add a listener for changes to the tablevoid
addTableListener(String key, ITableListener listener, boolean immediateNotify)
Deprecated.Add a listener for changes to a specific key the tablevoid
addTableListenerEx(ITableListener listener, int flags)
Deprecated.Add a listener for changes to the tablevoid
addTableListenerEx(String key, ITableListener listener, int flags)
Deprecated.Add a listener for changes to a specific key the tablevoid
clearFlags(String key, int flags)
Deprecated.Clears flags on the specified key in this table.void
clearPersistent(String key)
Deprecated.Stop making a key's value persistent through program restarts.boolean
containsKey(String key)
Deprecated.Checks the table and tells if it contains the specified keyboolean
containsSubTable(String key)
Deprecated.void
delete(String key)
Deprecated.Deletes the specified key in this table.boolean
getBoolean(String key, boolean defaultValue)
Deprecated.Returns the boolean the key maps to.boolean[]
getBooleanArray(String key, boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to.Boolean[]
getBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to.double
getDouble(String key, double defaultValue)
Deprecated.UsegetNumber(String, double)
instead.int
getFlags(String key)
Deprecated.Returns the flags for the specified key.Set<String>
getKeys()
Deprecated.Gets all keys in the table (not including sub-tables).Set<String>
getKeys(int types)
Deprecated.Gets all keys in the table (not including sub-tables).double
getNumber(String key, double defaultValue)
Deprecated.Returns the number the key maps to.double[]
getNumberArray(String key, double[] defaultValue)
Deprecated.Returns the number array the key maps to.Double[]
getNumberArray(String key, Double[] defaultValue)
Deprecated.Returns the number array the key maps to.String
getPath()
Deprecated.Gets the full path of this table.byte[]
getRaw(String key, byte[] defaultValue)
Deprecated.Returns the raw value (byte array) the key maps to.String
getString(String key, String defaultValue)
Deprecated.Returns the string the key maps to.String[]
getStringArray(String key, String[] defaultValue)
Deprecated.Returns the string array the key maps to.ITable
getSubTable(String key)
Deprecated.Returns the table at the specified key.Set<String>
getSubTables()
Deprecated.Gets the names of all subtables in the table.Object
getValue(String key, Object defaultValue)
Deprecated.Gets the value associated with a key as an object.boolean
isPersistent(String key)
Deprecated.Returns whether the value is persistent through program restarts.boolean
putBoolean(String key, boolean value)
Deprecated.Put a boolean in the tableboolean
putBooleanArray(String key, boolean[] value)
Deprecated.Put a boolean array in the tableboolean
putBooleanArray(String key, Boolean[] value)
Deprecated.Put a boolean array in the tableboolean
putDouble(String key, double value)
Deprecated.UseputNumber(String, double)
instead.boolean
putNumber(String key, double value)
Deprecated.Put a number in the tableboolean
putNumberArray(String key, double[] value)
Deprecated.Put a number array in the tableboolean
putNumberArray(String key, Double[] value)
Deprecated.Put a number array in the tableboolean
putRaw(String key, byte[] value)
Deprecated.Put a raw value (byte array) in the tableboolean
putRaw(String key, ByteBuffer value, int len)
Deprecated.Put a raw value (bytes from a byte buffer) in the tableboolean
putString(String key, String value)
Deprecated.Put a string in the tableboolean
putStringArray(String key, String[] value)
Deprecated.Put a string array in the tableboolean
putValue(String key, Object value)
Deprecated.Put a value in the tablevoid
removeTableListener(ITableListener listener)
Deprecated.Remove a listener from receiving table eventsboolean
setDefaultBoolean(String key, boolean defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultBooleanArray(String key, boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultNumber(String key, double defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultNumberArray(String key, double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultNumberArray(String key, Double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultRaw(String key, byte[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultString(String key, String defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.boolean
setDefaultStringArray(String key, String[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.void
setFlags(String key, int flags)
Deprecated.Sets flags on the specified key in this table.void
setPersistent(String key)
Deprecated.Makes a key's value persistent through program restarts.
-
-
-
Field Detail
-
NOTIFY_IMMEDIATE
static final int NOTIFY_IMMEDIATE
Deprecated.Notifier flag values.- See Also:
- Constant Field Values
-
NOTIFY_LOCAL
static final int NOTIFY_LOCAL
Deprecated.- See Also:
- Constant Field Values
-
NOTIFY_NEW
static final int NOTIFY_NEW
Deprecated.- See Also:
- Constant Field Values
-
NOTIFY_DELETE
static final int NOTIFY_DELETE
Deprecated.- See Also:
- Constant Field Values
-
NOTIFY_UPDATE
static final int NOTIFY_UPDATE
Deprecated.- See Also:
- Constant Field Values
-
NOTIFY_FLAGS
static final int NOTIFY_FLAGS
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
containsKey
boolean containsKey(String key)
Deprecated.Checks the table and tells if it contains the specified key- Parameters:
key
- the key to search for- Returns:
- true if the table as a value assigned to the given key
-
containsSubTable
boolean containsSubTable(String key)
Deprecated.- Parameters:
key
- the key to search for- Returns:
- true if there is a subtable with the key which contains at least one key/subtable of its own
-
getSubTable
ITable getSubTable(String key)
Deprecated.Returns the table at the specified key. If there is no table at the specified key, it will create a new table- Parameters:
key
- the name of the table relative to this one- Returns:
- a sub table relative to this one
-
getKeys
Set<String> getKeys(int types)
Deprecated.Gets all keys in the table (not including sub-tables).- Parameters:
types
- bitmask of types; 0 is treated as a "don't care".- Returns:
- keys currently in the table
-
getKeys
Set<String> getKeys()
Deprecated.Gets all keys in the table (not including sub-tables).- Returns:
- keys currently in the table
-
getSubTables
Set<String> getSubTables()
Deprecated.Gets the names of all subtables in the table.- Returns:
- subtables currently in the table
-
setPersistent
void setPersistent(String key)
Deprecated.Makes a key's value persistent through program restarts. The key cannot be null.- Parameters:
key
- the key name
-
clearPersistent
void clearPersistent(String key)
Deprecated.Stop making a key's value persistent through program restarts. The key cannot be null.- Parameters:
key
- the key name
-
isPersistent
boolean isPersistent(String key)
Deprecated.Returns whether the value is persistent through program restarts. The key cannot be null.- Parameters:
key
- the key name- Returns:
- True if the value is persistent.
-
setFlags
void setFlags(String key, int flags)
Deprecated.Sets flags on the specified key in this table. The key can not be null.- Parameters:
key
- the key nameflags
- the flags to set (bitmask)
-
clearFlags
void clearFlags(String key, int flags)
Deprecated.Clears flags on the specified key in this table. The key can not be null.- Parameters:
key
- the key nameflags
- the flags to clear (bitmask)
-
getFlags
int getFlags(String key)
Deprecated.Returns the flags for the specified key.- Parameters:
key
- the key name- Returns:
- the flags, or 0 if the key is not defined
-
delete
void delete(String key)
Deprecated.Deletes the specified key in this table. The key can not be null.- Parameters:
key
- the key name
-
getValue
Object getValue(String key, Object defaultValue)
Deprecated.Gets the value associated with a key as an object. NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, usegetDouble(String, double)
.- Parameters:
key
- the key of the value to look updefaultValue
- the default value if the key is null- Returns:
- the value associated with the given key
-
putValue
boolean putValue(String key, Object value) throws IllegalArgumentException
Deprecated.Put a value in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
- Throws:
IllegalArgumentException
- when the value is not supported by the table
-
putNumber
boolean putNumber(String key, double value)
Deprecated.Put a number in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultNumber
boolean setDefaultNumber(String key, double defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getNumber
double getNumber(String key, double defaultValue)
Deprecated.Returns the number the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putString
boolean putString(String key, String value)
Deprecated.Put a string in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultString
boolean setDefaultString(String key, String defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getString
String getString(String key, String defaultValue)
Deprecated.Returns the string the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putBoolean
boolean putBoolean(String key, boolean value)
Deprecated.Put a boolean in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultBoolean
boolean setDefaultBoolean(String key, boolean defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getBoolean
boolean getBoolean(String key, boolean defaultValue)
Deprecated.Returns the boolean the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putBooleanArray
boolean putBooleanArray(String key, boolean[] value)
Deprecated.Put a boolean array in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultBooleanArray
boolean setDefaultBooleanArray(String key, boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
putBooleanArray
boolean putBooleanArray(String key, Boolean[] value)
Deprecated.Put a boolean array in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultBooleanArray
boolean setDefaultBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getBooleanArray
boolean[] getBooleanArray(String key, boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
getBooleanArray
Boolean[] getBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putNumberArray
boolean putNumberArray(String key, double[] value)
Deprecated.Put a number array in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultNumberArray
boolean setDefaultNumberArray(String key, double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
putNumberArray
boolean putNumberArray(String key, Double[] value)
Deprecated.Put a number array in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultNumberArray
boolean setDefaultNumberArray(String key, Double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getNumberArray
double[] getNumberArray(String key, double[] defaultValue)
Deprecated.Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
getNumberArray
Double[] getNumberArray(String key, Double[] defaultValue)
Deprecated.Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putStringArray
boolean putStringArray(String key, String[] value)
Deprecated.Put a string array in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultStringArray
boolean setDefaultStringArray(String key, String[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getStringArray
String[] getStringArray(String key, String[] defaultValue)
Deprecated.Returns the string array the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putRaw
boolean putRaw(String key, byte[] value)
Deprecated.Put a raw value (byte array) in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultRaw
boolean setDefaultRaw(String key, byte[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Parameters:
key
- the keydefaultValue
- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
putRaw
boolean putRaw(String key, ByteBuffer value, int len)
Deprecated.Put a raw value (bytes from a byte buffer) in the table- Parameters:
key
- the key to be assigned tovalue
- the value that will be assignedlen
- the length of the value- Returns:
- False if the table key already exists with a different type
-
getRaw
byte[] getRaw(String key, byte[] defaultValue)
Deprecated.Returns the raw value (byte array) the key maps to. If the key does not exist or is of different type, it will return the default value.- Parameters:
key
- the key to look updefaultValue
- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
addTableListener
void addTableListener(ITableListener listener)
Deprecated.Add a listener for changes to the table- Parameters:
listener
- the listener to add
-
addTableListener
void addTableListener(ITableListener listener, boolean immediateNotify)
Deprecated.Add a listener for changes to the table- Parameters:
listener
- the listener to addimmediateNotify
- if true then this listener will be notified of all current entries (marked as new)
-
addTableListenerEx
void addTableListenerEx(ITableListener listener, int flags)
Deprecated.Add a listener for changes to the table- Parameters:
listener
- the listener to addflags
- bitmask specifying desired notifications
-
addTableListener
void addTableListener(String key, ITableListener listener, boolean immediateNotify)
Deprecated.Add a listener for changes to a specific key the table- Parameters:
key
- the key to listen forlistener
- the listener to addimmediateNotify
- if true then this listener will be notified of all current entries (marked as new)
-
addTableListenerEx
void addTableListenerEx(String key, ITableListener listener, int flags)
Deprecated.Add a listener for changes to a specific key the table- Parameters:
key
- the key to listen forlistener
- the listener to addflags
- bitmask specifying desired notifications
-
addSubTableListener
void addSubTableListener(ITableListener listener)
Deprecated.This will immediately notify the listener of all current sub tables- Parameters:
listener
- the listener to notify
-
addSubTableListener
void addSubTableListener(ITableListener listener, boolean localNotify)
Deprecated.This will immediately notify the listener of all current sub tables- Parameters:
listener
- the listener to notifylocalNotify
- if true then this listener will be notified of all local changes in addition to all remote changes
-
removeTableListener
void removeTableListener(ITableListener listener)
Deprecated.Remove a listener from receiving table events- Parameters:
listener
- the listener to be removed
-
putDouble
@Deprecated boolean putDouble(String key, double value)
Deprecated.UseputNumber(String, double)
instead.Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.- Parameters:
key
- the keyvalue
- the value- Returns:
- False if the table key already exists with a different type
- Throws:
IllegalArgumentException
- if key is null
-
getDouble
@Deprecated double getDouble(String key, double defaultValue)
Deprecated.UsegetNumber(String, double)
instead.Returns the value at the specified key.- Parameters:
key
- the keydefaultValue
- the value returned if the key is undefined- Returns:
- the value
- Throws:
IllegalArgumentException
- if the value mapped to by the key is not a doubleIllegalArgumentException
- if the key is null
-
getPath
String getPath()
Deprecated.Gets the full path of this table. Does not include the trailing "/".- Returns:
- The path to this table (e.g. "", "/foo").
-
-