edu.wpi.first.wpilibj.networktables
Class NetworkTableSubListenerAdapter
java.lang.Object
edu.wpi.first.wpilibj.networktables.NetworkTableSubListenerAdapter
- All Implemented Interfaces:
- ITableListener
public class NetworkTableSubListenerAdapter
- extends Object
- implements ITableListener
An adapter that is used to filter sub table change notifications and make the path relative to the NetworkTable
- 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 |
NetworkTableSubListenerAdapter
public NetworkTableSubListenerAdapter(String prefix,
NetworkTable targetSource,
ITableListener targetListener)
- Create a new adapter
- Parameters:
prefix
- the prefix of the current tabletargetSource
- 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.