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
007import edu.wpi.first.util.sendable.Sendable;
008import edu.wpi.first.util.sendable.SendableBuilder;
009
010/** Interface for NetworkTable Sendable objects. */
011public interface NTSendable extends Sendable {
012  /**
013   * Initializes this {@link Sendable} object.
014   *
015   * @param builder sendable builder
016   */
017  void initSendable(NTSendableBuilder builder);
018
019  @Override
020  default void initSendable(SendableBuilder builder) {
021    if (builder.getBackendKind() == SendableBuilder.BackendKind.kNetworkTables) {
022      initSendable((NTSendableBuilder) builder);
023    }
024  }
025}