public final class NetworkTable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
PATH_SEPARATOR
The path separator for sub-tables and keys
|
Constructor and Description |
---|
NetworkTable(NetworkTableInstance inst,
java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
int |
addEntryListener(java.lang.String key,
TableEntryListener listener,
int flags)
Listen to a single key.
|
int |
addEntryListener(TableEntryListener listener,
int flags)
Listen to keys only within this table.
|
int |
addSubTableListener(TableListener listener,
boolean localNotify)
Listen for sub-table creation.
|
boolean |
containsKey(java.lang.String key)
Checks the table and tells if it contains the specified key
|
boolean |
containsSubTable(java.lang.String key) |
void |
delete(java.lang.String key)
Deletes the specified key in this table.
|
boolean |
equals(java.lang.Object o) |
NetworkTableEntry |
getEntry(java.lang.String key)
Gets the entry for a subkey.
|
NetworkTableInstance |
getInstance()
Gets the instance for the table.
|
java.util.Set<java.lang.String> |
getKeys()
Gets all keys in the table (not including sub-tables).
|
java.util.Set<java.lang.String> |
getKeys(int types)
Gets all keys in the table (not including sub-tables).
|
java.lang.String |
getPath() |
NetworkTable |
getSubTable(java.lang.String key)
Returns the table at the specified key.
|
java.util.Set<java.lang.String> |
getSubTables()
Gets the names of all subtables in the table.
|
int |
hashCode() |
java.lang.String[] |
loadEntries(java.lang.String filename)
Load table values from a file.
|
void |
removeEntryListener(int listener)
Remove an entry listener.
|
void |
removeTableListener(int listener)
Remove a sub-table listener.
|
void |
saveEntries(java.lang.String filename)
Save table values to a file.
|
java.lang.String |
toString() |
public static final char PATH_SEPARATOR
public NetworkTable(NetworkTableInstance inst, java.lang.String path)
public NetworkTableInstance getInstance()
public java.lang.String toString()
toString
in class java.lang.Object
public NetworkTableEntry getEntry(java.lang.String key)
key
- the key namepublic int addEntryListener(TableEntryListener listener, int flags)
listener
- listener to addflags
- EntryListenerFlags
bitmaskpublic int addEntryListener(java.lang.String key, TableEntryListener listener, int flags)
key
- the key namelistener
- listener to addflags
- EntryListenerFlags
bitmaskpublic void removeEntryListener(int listener)
listener
- listener handlepublic int addSubTableListener(TableListener listener, boolean localNotify)
listener
- listener to addlocalNotify
- notify local changes as well as remotepublic void removeTableListener(int listener)
listener
- listener handlepublic NetworkTable getSubTable(java.lang.String key)
key
- the name of the table relative to this onepublic boolean containsKey(java.lang.String key)
key
- the key to search forpublic boolean containsSubTable(java.lang.String key)
key
- the key to search forpublic java.util.Set<java.lang.String> getKeys(int types)
types
- bitmask of types; 0 is treated as a "don't care".public java.util.Set<java.lang.String> getKeys()
public java.util.Set<java.lang.String> getSubTables()
public void delete(java.lang.String key)
key
- the key namepublic java.lang.String getPath()
public void saveEntries(java.lang.String filename) throws PersistentException
filename
- filenamePersistentException
- if error saving filepublic java.lang.String[] loadEntries(java.lang.String filename) throws PersistentException
filename
- filenamePersistentException
- if error saving filepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object