Enum Class ConcurrentMergeState
- All Implemented Interfaces:
Serializable,Comparable<ConcurrentMergeState>,Constable
This enum represents the current state of the merge object. Methods within a merge object can only be invoked in certain states, otherwise IllegalStateException will be thrown. The table below documents which methods can be thrown in each state, and what effect those methods have on the state.
| Method | Callable in State | Subsequent State | |||
|---|---|---|---|---|---|
| INITIAL | RESET | STARTED | EXTRACTABLE | ||
| setAncestor(java.io.File, String) setAncestor(java.io.InputStream, String, String) setAncestor(java.io.Reader, String, String) setAncestor(java.net.URL, String) |
✓ | ✓ | ✗ | ✗ | STARTED |
| addVersion(java.io.File, String) addVersion(java.io.InputStream, String, String) addVersion(java.io.Reader, String, String) addVersion(java.net.URL, String) |
✗ | ✗ | ✓ | ✓ | EXTRACTABLE |
| extractAll(java.io.File) extractAll(java.io.OutputStream) extractAll(java.io.Writer) |
✗ | ✗ | ✗ | ✓ | |
| reset() | ✓ | ✓ | ✓ | ✓ | RESET |
| setEntityResolver(org.xml.sax.EntityResolver, boolean) setWordByWord(boolean) setDoctypePreservationMode(DoctypePreservationMode) setEntityReferencePreservationMode(EntityReferencePreservationMode) |
✓ | ✓ | ✗ | ✗ | |
The change of state is demonstrated in the following state-diagram:
The current state of the merge object can be accessed via getCurrentState().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis is the state after two or more versions have been added.This is the state after initializing a merge object.This is the state after calling reset().This is the state after setting an ancestor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConcurrentMergeStateReturns the enum constant of this class with the specified name.static ConcurrentMergeState[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INITIAL
This is the state after initializing a merge object.
-
RESET
This is the state after calling reset(). This state is similar to INITIAL, however setEntityResolver(org.xml.sax.EntityResolver, boolean), setWordByWord(boolean), setDoctypePreservationMode(DoctypePreservationMode) and setEntityReferencePreservationMode(EntityReferencePreservationMode) do not need to be re-called.
-
STARTED
This is the state after setting an ancestor.
-
EXTRACTABLE
This is the state after two or more versions have been added.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-