Enum SingularFileMode

    • Enum Constant Detail

      • FORBIDDEN

        public static final SingularFileMode FORBIDDEN
        A file is never allowed to be present.
      • OPTIONAL

        public static final SingularFileMode OPTIONAL
        A file may or may not be present.
      • REQUIRED

        public static final SingularFileMode REQUIRED
        A file is always required to be present.
    • Method Detail

      • values

        public static SingularFileMode[] 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 (SingularFileMode c : SingularFileMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SingularFileMode 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
      • allowsFile

        public abstract boolean allowsFile()
        Returns whether a file is allowed to be present in this mode, i.e. whether the mode is OPTIONAL or REQUIRED.
        Returns:
        true if a file is allowed, false otherwise.
      • maxFileCount

        public abstract int maxFileCount()
        Returns the maximum number of files allowed by this mode.
        Returns:
        The maximum file count.
      • minFileCount

        public abstract int minFileCount()
        Returns the minimum number of files required by this mode.
        Returns:
        The minimum file count.