edu.wpi.first.wpilibj.networktables
Class NetworkTableSubListenerAdapter

java.lang.Object
  extended by 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

Constructor Summary
NetworkTableSubListenerAdapter(String prefix, NetworkTable targetSource, ITableListener targetListener)
          Create a new adapter
 
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
 

Constructor Detail

NetworkTableSubListenerAdapter

public NetworkTableSubListenerAdapter(String prefix,
                                      NetworkTable targetSource,
                                      ITableListener targetListener)
Create a new adapter

Parameters:
prefix - the prefix of the current table
targetSource - the source that events passed to the target listener will appear to come from
targetListener - the listener where events are forwarded to
Method Detail

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 in
key - the key associated with the value that changed
value - the new value
isNew - true if the key did not previously exist in the table, otherwise it is false


Copyright © 2013. All rights reserved.