Enum ResourceType

    • Method Detail

      • values

        public static ResourceType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ResourceType c : ResourceType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ResourceType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getFolder

        public String getFolder()
        Returns the relative path for this type.
        Returns:
        the relative path
      • supportsSubfolders

        public boolean supportsSubfolders()
        Checks whether this type supports subfolders.
        Returns:
        true if this type supports subfolder, false otherwise
      • isValidFileEnding

        public boolean isValidFileEnding​(String fileEnding)
        Checks whether the given file-ending is valid for this type.
        Parameters:
        fileEnding - a file-ending, without '.'
        Returns:
        true if the given file-ending is valid for this type, false otherwise
      • isValidFileName

        public boolean isValidFileName​(String fileName)
        Checks whether the given file-name is valid for this type.
        Parameters:
        fileName - the name of the file
        Returns:
        true if the given file-name is valid for this type, false otherwise
      • getAllowedFileEndings

        public Set<String> getAllowedFileEndings()
        Returns an immutable set of all allowed file-endings (without '.')
        Returns:
        a set of all allowed file-endings. An empty set means all file types are allowed.