Package org.opends.server.types
Enum ExistingFileBehavior
- java.lang.Object
-
- java.lang.Enum<ExistingFileBehavior>
-
- org.opends.server.types.ExistingFileBehavior
-
- All Implemented Interfaces:
Serializable
,Comparable<ExistingFileBehavior>
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public enum ExistingFileBehavior extends Enum<ExistingFileBehavior>
This enumeration defines the set of possible behaviors that should be taken when attempting to write to a file that already exists.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPEND
The file behavior that indicates that the data written should be appended to any existing file.FAIL
The file behavior that indicates that the write should fail if the specified file already exists.OVERWRITE
The file behavior that indicates that the data written should overwrite any existing file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Retrieves the name for this existing file behavior.String
toString()
Retrieves a string representation of this existing file behavior.static ExistingFileBehavior
valueOf(String name)
Returns the enum constant of this type with the specified name.static ExistingFileBehavior[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
APPEND
public static final ExistingFileBehavior APPEND
The file behavior that indicates that the data written should be appended to any existing file.
-
OVERWRITE
public static final ExistingFileBehavior OVERWRITE
The file behavior that indicates that the data written should overwrite any existing file.
-
FAIL
public static final ExistingFileBehavior FAIL
The file behavior that indicates that the write should fail if the specified file already exists.
-
-
Method Detail
-
values
public static ExistingFileBehavior[] 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 (ExistingFileBehavior c : ExistingFileBehavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExistingFileBehavior 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
-
getName
public String getName()
Retrieves the name for this existing file behavior.- Returns:
- The name for this existing file behavior.
-
toString
public String toString()
Retrieves a string representation of this existing file behavior.- Overrides:
toString
in classEnum<ExistingFileBehavior>
- Returns:
- A string representation of this existing file behavior.
-
-