Package mekhq.io

Enum Class FileType

All Implemented Interfaces:
Serializable, Comparable<FileType>, Constable

public enum FileType extends Enum<FileType>
Enumeration holding information about the file types that are most relevant for MekHQ
  • Enum Constant Details

    • PRSX

      public static final FileType PRSX
      Value for personnel files.
    • PARTS

      public static final FileType PARTS
      Value for parts files.
    • JSON

      public static final FileType JSON
      Value for json files.
    • CSV

      public static final FileType CSV
      Value for csv files.
    • TSV

      public static final FileType TSV
      Value for tsv files.
    • XML

      public static final FileType XML
      Value for xml files.
    • PNG

      public static final FileType PNG
      Value for png files.
    • MUL

      public static final FileType MUL
      Value for mul files.
    • CPNX

      public static final FileType CPNX
      Value for campaign files.
  • Method Details

    • values

      public static FileType[] 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 FileType 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
    • getDescription

      public String getDescription()
      Returns:
      the description of this file type
    • getExtensions

      public List<String> getExtensions()
      Returns:
      what extensions the files of type usually have
    • getRecommendedExtension

      public String getRecommendedExtension()
      Returns:
      the recommended extension for files of this type
    • getNameFilter

      public Predicate<String> getNameFilter()
      Returns:
      a matcher to filter files of this type based on the file name