Enum Class Documentation

java.lang.Object
java.lang.Enum<Documentation>
com.j3d.gen.docs.Documentation
All Implemented Interfaces:
Serializable, Comparable<Documentation>, Constable

public enum Documentation extends Enum<Documentation>
Represents different documentation files available within da arp. Each enum constant corresponds to a specific documentation topic, providing its human-readable label, a unique file identifier, and a reference to the actual documentation file on the file system.
  • Enum Constant Details

    • GETTING_STARTED

      public static final Documentation GETTING_STARTED
      Guide for getting started with the engine.
    • ABOUT

      public static final Documentation ABOUT
      Documentation about the engine.
    • EDITING

      public static final Documentation EDITING
      Documentation related to editing features.
    • COMMANDS

      public static final Documentation COMMANDS
      Documentation about available commands.
    • MATHS

      public static final Documentation MATHS
      Documentation on mathematical concepts used in the engine.
  • Field Details

    • MAP

      private static LinkedHashMap<String,Pair<String,JarPath>> MAP
      A cached map of documentation files, keyed by their file ID. The value is a Pair where the first element is the label and the second element is the File object.
    • fileId

      private final String fileId
      The unique identifier for the documentation file (e.g., "about").
    • file

      private final JarPath file
      The actual File object pointing to the documentation file.
    • label

      private final String label
      The human-readable label for the documentation (e.g., "About").
  • Constructor Details

    • Documentation

      private Documentation(String label, String id)
      Constructs a new Documentation enum constant.
      Parameters:
      label - The human-readable label for the documentation.
      id - The unique identifier used for the file name (e.g., "about" for "about.j3.md").
  • Method Details

    • values

      public static Documentation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Documentation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toMap

      public static LinkedHashMap<String,Pair<String,JarPath>> toMap()
      Returns a LinkedHashMap containing all documentation entries, keyed by their file ID. Each value in the map is a Pair where the first element is the human-readable label and the second element is the actual File object. The map is lazily initialised and cached.
      Returns:
      A LinkedHashMap mapping file IDs to a Pair of label and file.
    • from

      public static Documentation from(String id)
    • getFile

      public JarPath getFile()
      Gets the File object associated with this documentation entry.
      Returns:
      The File object representing the documentation file.
    • getLabel

      public String getLabel()
      Gets the human-readable label for this documentation entry.
      Returns:
      The label string.
    • getFileId

      public String getFileId()
      Gets the unique file identifier for this documentation entry. This ID is used to construct the file name.
      Returns:
      The file ID string.