Enum Class FileTypePrefix

java.lang.Object
java.lang.Enum<FileTypePrefix>
de.cuioss.tools.io.FileTypePrefix
All Implemented Interfaces:
Serializable, Comparable<FileTypePrefix>, Constable

public enum FileTypePrefix extends Enum<FileTypePrefix>
Utility class to define file type prefixes.
Author:
Sven Haag
  • Enum Constant Details

  • Method Details

    • values

      public static FileTypePrefix[] 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 FileTypePrefix 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
    • is

      public boolean is(String path)
      Parameters:
      path - to be checked
      Returns:
      true if the given path is prefixed with this enum
    • removePrefix

      public String removePrefix(String path)
      Parameters:
      path - from which the prefix should be removed
      Returns:
      path without #getPrefix()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FileTypePrefix>