001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.networktables;
006
007/** A listener that listens to changes in values in a {@link NetworkTable}. */
008@FunctionalInterface
009public interface TableEntryListener extends EntryListenerFlags {
010  /**
011   * Called when a key-value pair is changed in a {@link NetworkTable}.
012   *
013   * @param table the table the key-value pair exists in
014   * @param key the key associated with the value that changed
015   * @param entry the entry associated with the value that changed
016   * @param value the new value
017   * @param flags update flags; for example, EntryListenerFlags.kNew if the key did not previously
018   *     exist in the table
019   */
020  void valueChanged(
021      NetworkTable table, String key, NetworkTableEntry entry, NetworkTableValue value, int flags);
022}