Enum FileFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FileFormat>, java.lang.constant.Constable

    public enum FileFormat
    extends java.lang.Enum<FileFormat>
    This enum lists all supported file formats.
    Author:
    Matthias Thimm
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Enum

        java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      APX  
      CNF  
      TGF  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String description
      The description of the file format.
      private java.lang.String extension
      The extension of the file format
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FileFormat​(java.lang.String extension, java.lang.String description)
      Creates a new FileFormat
    • Method Summary

      Modifier and Type Method Description
      java.lang.String description()
      Returns the description of the file format.
      java.lang.String extension()
      Returns the extension of the file format.
      static FileFormat getFileFormat​(java.lang.String s)
      Returns the file format instance that corresponds to the given abbrevation
      static java.util.Collection<FileFormat> getFileFormats​(java.lang.String s)
      Returns a collection of file formats parsed from the given string which has to be in the format "[format1,...,formatn]".
      java.lang.String toString()  
      static FileFormat valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FileFormat[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • extension

        private java.lang.String extension
        The extension of the file format
      • description

        private java.lang.String description
        The description of the file format.
    • Constructor Detail

      • FileFormat

        private FileFormat​(java.lang.String extension,
                           java.lang.String description)
        Creates a new FileFormat
        Parameters:
        extension - the extension of the file format
        description - some description
    • Method Detail

      • values

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

        public static FileFormat valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • extension

        public java.lang.String extension()
        Returns the extension of the file format.
        Returns:
        the extension of the file format.
      • description

        public java.lang.String description()
        Returns the description of the file format.
        Returns:
        the description of the file format.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<FileFormat>
      • getFileFormat

        public static FileFormat getFileFormat​(java.lang.String s)
        Returns the file format instance that corresponds to the given abbrevation
        Parameters:
        s - some string describing a file format
        Returns:
        the file format instance corresponding to the string.
      • getFileFormats

        public static java.util.Collection<FileFormat> getFileFormats​(java.lang.String s)
        Returns a collection of file formats parsed from the given string which has to be in the format "[format1,...,formatn]".
        Parameters:
        s - some string
        Returns:
        a collection of file formats