Package com.levigo.jadice.document
Enum Class Document.BasicState
- All Implemented Interfaces:
Document.State
,Serializable
,Comparable<Document.BasicState>
,Constable
- Enclosing interface:
Document
An enum consisting of the default document states. The states contained therein are recognized
by the default command implementations. If you add document states by supplying your own
implementation of the
Document.State
interface, you may have to extend or re-implement those
commands.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThisDocument.State
has a meaning similar toLOADING
.Usually thisDocument.State
marks the end of aDocument
's lifecycle and is its terminalDocument.State
.If thisDocument.State
is set, it marks aDocument
as loading and therefore still incomplete.This state marks aDocument
as being ready for use.Marks aDocument
as being in an unusual, unexpected, or generally unspecified state. -
Method Summary
Modifier and TypeMethodDescriptionstatic Document.BasicState
Returns the enum constant of this class with the specified name.static Document.BasicState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READY
-
LOADING
If thisDocument.State
is set, it marks aDocument
as loading and therefore still incomplete. It might be already useful but some parts of it may be missing.Reader and Fluent Reader API both set this
Document.State
when loading into aDocument
begins. Usually, it need not be used by integrators directly. BUSY is a semantically similar alternative. -
BUSY
ThisDocument.State
has a meaning similar toLOADING
. It is intended to be used by integrators in situations in whichDocument
s are being restructured or in some other way worked with and therefore not ready for other uses. BUSY has a broader range of applications thanLOADING
which specifically indicates a loading process by the Reader or Fluent Reader API. -
CLOSED
Usually thisDocument.State
marks the end of aDocument
's lifecycle and is its terminalDocument.State
. After aDocument
has been disposed of it will be in thisDocument.State
. It is also possible to set this state directly and transition from it to some otherDocument.State
as long as theDocument
has not yet been disposed of. In this case, CLOSED can take the meaning of "temporarily closed".- See Also:
-
UNKNOWN
Marks aDocument
as being in an unusual, unexpected, or generally unspecified state. This could be the result of a processing error, but need not necessarily be.
-
-
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
-