Package io.ocfl.api
Enum OcflOption
- java.lang.Object
-
- java.lang.Enum<OcflOption>
-
- io.ocfl.api.OcflOption
-
- All Implemented Interfaces:
Serializable
,Comparable<OcflOption>
public enum OcflOption extends Enum<OcflOption>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MOVE_SOURCE
Instructs an update operation to move files into the repository instead of copying them.NO_VALIDATION
Disables validations that ensure the integrity of OCFL objectsOVERWRITE
Instructs an update operation to overwrite existing files in an object.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
contains(OcflOption test, OcflOption... options)
Returns true if the set of options contains the specified optionstatic Set<OcflOption>
toSet(OcflOption... options)
Transforms a varargs of options into a setstatic OcflOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static OcflOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OVERWRITE
public static final OcflOption OVERWRITE
Instructs an update operation to overwrite existing files in an object.
-
MOVE_SOURCE
public static final OcflOption MOVE_SOURCE
Instructs an update operation to move files into the repository instead of copying them.
-
NO_VALIDATION
public static final OcflOption NO_VALIDATION
Disables validations that ensure the integrity of OCFL objects
-
-
Method Detail
-
values
public static OcflOption[] 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 (OcflOption c : OcflOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OcflOption 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
-
toSet
public static Set<OcflOption> toSet(OcflOption... options)
Transforms a varargs of options into a set- Parameters:
options
- options- Returns:
- set of options
-
contains
public static boolean contains(OcflOption test, OcflOption... options)
Returns true if the set of options contains the specified option- Parameters:
test
- the option to look foroptions
- the set of options- Returns:
- true if the specified option is in the set
-
-