Class Tool

java.lang.Object
tools.ToolClasses.Tool

public abstract class Tool extends Object

Tool

A class that represents a tool that can be run. This is for simple actions and doesn't take in any arguments. For tools that take in arguments, use ArgumentedTool instead.

To use, simply extend this class and implement the execute() method. Then, to run the tool, simply call the run() method.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor for the tool.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    The functionality for the tool.
    final void
    run()
    The main entry point for the tool.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Tool

      protected Tool()
      Default constructor for the tool. This is protected to prevent instantiation of the tool without extending it.
  • Method Details

    • execute

      protected abstract void execute()
      The functionality for the tool. Must be implemented.
    • run

      public final void run()
      The main entry point for the tool. This will call the execute() method.