001/************************* PROJECT RON *************************/
002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved. */
003/* Use of this source code is governed by an MIT-style license */
004/* that can be found in the repository LICENSE file.           */
005/***************************************************************/
006package tools.ToolClasses;
007
008/**
009 * <h2>ArgumentEnum</h2>
010 * An interface that represents an enum that defines arguments for an {@link ArgumentedTool}.
011 * <p>Each enum constant represents an argument. It must specify the following:
012 * <ul>
013 *    <li><b>ArgumentType</b>: The type of the argument. This takes in a class and is used to parse the raw string argument into the correct type. Supported types are:
014 *    <ul>
015 *      <li>{@link String}</li>
016 *      <li>{@link Integer}</li>
017 *      <li>{@link Double}</li>
018 *      <li>{@link Boolean}</li>
019 *      <li>{@link Enum}</li>
020 *    </ul>
021 *    </li>
022 *  <li><b>DefaultValue</b>: The default value for the argument. This is used if the argument is missing or fails to parse. Can be null.</li>
023 *  <li><b>Description</b>: A description of the argument. This is used for documentation purposes.</li>
024 * </ul>
025 * <p>Example usage:
026 * <pre>
027 * public enum ARGUMENTS implements ArgumentEnum {
028 *     TIMEOUT(Integer.class, 30, "Timeout in seconds"),
029 *     VERBOSE(Boolean.class, false, "Enable verbose logging"),
030 *
031 *     private final Class{@literal <?>} argumentType;
032 *     private final Object defaultValue;
033 *     private final String description;
034 *
035 *     ARGUMENTS({@literal Class<?>} argumentType, Object defaultValue, String description) {
036 *         this.argumentType = argumentType;
037 *         this.defaultValue = defaultValue;
038 *         this.description = description;
039 *     }
040 *
041 *     {@literal @Override}
042 *     public Class{@literal <?>} getArgumentType() { return argumentType; }
043 *
044 *     {@literal @Override}
045 *     public Object getDefaultValue() { return defaultValue; }
046 *
047 *     {@literal @Override}
048 *     public String getDescription() { return description; }
049 * }
050 * </pre>
051 */
052public interface ArgumentEnum {
053    /**
054     * Gets the argument type.
055     * @return the argument type
056     */
057    Class<?> getArgumentType();
058    /**
059     * Gets the default value for the argument. This is used if the argument is missing or fails to parse. Can be null.
060     * @return the default value
061     */
062    Object getDefaultValue();
063    /**
064     * Gets the description of the argument. This is used for documentation purposes.
065     * @return the description
066     */
067    String getDescription();
068}