Enum SingularFileMode

java.lang.Object
java.lang.Enum<SingularFileMode>
de.xima.fc.prompt.service.support.SingularFileMode
All Implemented Interfaces:
Serializable, Comparable<SingularFileMode>

public enum SingularFileMode extends Enum<SingularFileMode>
Enumeration for a single input or output file that describes whether the file is required, optional, or never allowed.
Since:
8.5.0
  • Enum Constant Details

    • 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 Details

    • values

      public static SingularFileMode[] 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 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.