edu.wpi.first.wpilibj.networktables
Class NetworkTableKeyListenerAdapter
java.lang.Object
edu.wpi.first.wpilibj.networktables.NetworkTableKeyListenerAdapter
- All Implemented Interfaces:
- ITableListener
public class NetworkTableKeyListenerAdapter
- extends Object
- implements ITableListener
An adapter that is used to filter value change notifications for a specific key
- Author:
- Mitchell
|
Method Summary |
void |
valueChanged(ITable source,
String key,
Object value,
boolean isNew)
Called when a key-value pair is changed in a ITable
WARNING: If a new key-value is put in this method value changed will immediatly be called which could lead to recursive code |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetworkTableKeyListenerAdapter
public NetworkTableKeyListenerAdapter(String relativeKey,
String fullKey,
NetworkTable targetSource,
ITableListener targetListener)
- Create a new adapter
- Parameters:
relativeKey - the name of the key relative to the table (this is what the listener will receiver as the key)fullKey - the full name of the key in the NetworkTableNodetargetSource - the source that events passed to the target listener will appear to come fromtargetListener - the listener where events are forwarded to
valueChanged
public void valueChanged(ITable source,
String key,
Object value,
boolean isNew)
- Description copied from interface:
ITableListener
- Called when a key-value pair is changed in a
ITable
WARNING: If a new key-value is put in this method value changed will immediatly be called which could lead to recursive code
- Specified by:
valueChanged in interface ITableListener
- Parameters:
source - the table the key-value pair exists inkey - the key associated with the value that changedvalue - the new valueisNew - true if the key did not previously exist in the table, otherwise it is false
Copyright © 2013. All rights reserved.