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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanallowsFile()abstract intmaxFileCount()Returns the maximum number of files allowed by this mode.abstract intminFileCount()Returns the minimum number of files required by this mode.static SingularFileModevalueOf(String name)Returns the enum constant of this type with the specified name.static SingularFileMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException- 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 isOPTIONALorREQUIRED.- 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.
-
-