|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITable
A table whose values can be read and written to
Method Summary | |
---|---|
void |
addSubTableListener(ITableListener listener)
This will immediately notify the listener of all current sub tables |
void |
addTableListener(ITableListener listener)
Add a listener for changes to the table |
void |
addTableListener(ITableListener listener,
boolean immediateNotify)
Add a listener for changes to the table |
void |
addTableListener(String key,
ITableListener listener,
boolean immediateNotify)
Add a listener for changes to a specific key the table |
boolean |
containsKey(String key)
|
boolean |
containsSubTable(String key)
|
boolean |
getBoolean(String key)
|
boolean |
getBoolean(String key,
boolean defaultValue)
|
double |
getDouble(String key)
Deprecated. Returns the value at the specified key. |
double |
getDouble(String key,
double defaultValue)
Deprecated. Returns the value at the specified key. |
int |
getInt(String key)
Deprecated. Returns the value at the specified key. |
int |
getInt(String key,
int defaultValue)
Deprecated. Returns the value at the specified key. |
double |
getNumber(String key)
|
double |
getNumber(String key,
double defaultValue)
|
String |
getString(String key)
|
String |
getString(String key,
String defaultValue)
|
ITable |
getSubTable(String key)
|
Object |
getValue(String key)
Gets the value associated with a key as an object |
void |
putBoolean(String key,
boolean value)
Put a boolean in the table |
void |
putDouble(String key,
double value)
Deprecated. 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. |
void |
putInt(String key,
int value)
Deprecated. 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. |
void |
putNumber(String key,
double value)
Put a number in the table |
void |
putString(String key,
String value)
Put a string in the table |
void |
putValue(String key,
Object value)
Put a value in the table |
void |
removeTableListener(ITableListener listener)
Remove a listener from receiving table events |
void |
retrieveValue(String key,
Object externalValue)
|
Method Detail |
---|
boolean containsKey(String key)
key
- the key to search for
boolean containsSubTable(String key)
key
- the key to search for
ITable getSubTable(String key)
key
- the name of the table relative to this one
Object getValue(String key) throws TableKeyNotDefinedException
key
- the key of the value to look up
TableKeyNotDefinedException
- if there is no value associated with the given keyvoid putValue(String key, Object value) throws IllegalArgumentException
key
- the key to be assigned tovalue
- the value that will be assigned
IllegalArgumentException
- when the value is not supported by the tablevoid retrieveValue(String key, Object externalValue)
void putNumber(String key, double value)
key
- the key to be assigned tovalue
- the value that will be assigneddouble getNumber(String key) throws TableKeyNotDefinedException
key
- the key to look up
TableKeyNotDefinedException
- if there is no value associated with the given keydouble getNumber(String key, double defaultValue)
key
- the key to look updefaultValue
- the value to be returned if no value is found
void putString(String key, String value)
key
- the key to be assigned tovalue
- the value that will be assignedString getString(String key) throws TableKeyNotDefinedException
key
- the key to look up
TableKeyNotDefinedException
- if there is no value associated with the given keyString getString(String key, String defaultValue)
key
- the key to look updefaultValue
- the value to be returned if no value is found
void putBoolean(String key, boolean value)
key
- the key to be assigned tovalue
- the value that will be assignedboolean getBoolean(String key) throws TableKeyNotDefinedException
key
- the key to look up
TableKeyNotDefinedException
- if there is no value associated with the given keyboolean getBoolean(String key, boolean defaultValue)
key
- the key to look updefaultValue
- the value to be returned if no value is found
void addTableListener(ITableListener listener)
listener
- the listener to addvoid addTableListener(ITableListener listener, boolean immediateNotify)
listener
- the listener to addimmediateNotify
- if true then this listener will be notified of all current entries (marked as new)void addTableListener(String key, ITableListener listener, boolean immediateNotify)
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)void addSubTableListener(ITableListener listener)
listener
- void removeTableListener(ITableListener listener)
listener
- the listener to be removedvoid putInt(String key, int value)
key
- the keyvalue
- the value
IllegalArgumentException
- if key is nullint getInt(String key) throws TableKeyNotDefinedException
key
- the key
TableKeyNotDefinedException
- if there is no value mapped to by the key
IllegalArgumentException
- if the value mapped to by the key is not an int
IllegalArgumentException
- if the key is nullint getInt(String key, int defaultValue) throws TableKeyNotDefinedException
key
- the keydefaultValue
- the value returned if the key is undefined
NetworkTableKeyNotDefined
- if there is no value mapped to by the key
IllegalArgumentException
- if the value mapped to by the key is not an int
IllegalArgumentException
- if the key is null
TableKeyNotDefinedException
void putDouble(String key, double value)
key
- the keyvalue
- the value
IllegalArgumentException
- if key is nulldouble getDouble(String key) throws TableKeyNotDefinedException
key
- the key
NoSuchEleNetworkTableKeyNotDefinedmentException
- if there is no value mapped to by the key
IllegalArgumentException
- if the value mapped to by the key is not a double
IllegalArgumentException
- if the key is null
TableKeyNotDefinedException
double getDouble(String key, double defaultValue)
key
- the keydefaultValue
- the value returned if the key is undefined
NoSuchEleNetworkTableKeyNotDefinedmentException
- if there is no value mapped to by the key
IllegalArgumentException
- if the value mapped to by the key is not a double
IllegalArgumentException
- if the key is null
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |