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.wpilibj2.command;
006
007/** A command that prints a string when initialized. */
008public class PrintCommand extends InstantCommand {
009  /**
010   * Creates a new a PrintCommand.
011   *
012   * @param message the message to print
013   */
014  public PrintCommand(String message) {
015    super(() -> System.out.println(message));
016  }
017
018  @Override
019  public boolean runsWhenDisabled() {
020    return true;
021  }
022}