Package org.bson
Enum AbstractBsonWriter.State
- java.lang.Object
-
- java.lang.Enum<AbstractBsonWriter.State>
-
- org.bson.AbstractBsonWriter.State
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AbstractBsonWriter.State>
- Enclosing class:
- AbstractBsonWriter
public static enum AbstractBsonWriter.State extends java.lang.Enum<AbstractBsonWriter.State>
The state of a writer. Indicates where in a document the writer is.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSED
The writer is closed.DONE
The writer is done.INITIAL
The initial state.NAME
The writer is positioned to write a name.SCOPE_DOCUMENT
The writer is positioned to write a scope document (call WriteStartDocument to start writing the scope document).VALUE
The writer is positioned to write a value.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractBsonWriter.State
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AbstractBsonWriter.State[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INITIAL
public static final AbstractBsonWriter.State INITIAL
The initial state.
-
NAME
public static final AbstractBsonWriter.State NAME
The writer is positioned to write a name.
-
VALUE
public static final AbstractBsonWriter.State VALUE
The writer is positioned to write a value.
-
SCOPE_DOCUMENT
public static final AbstractBsonWriter.State SCOPE_DOCUMENT
The writer is positioned to write a scope document (call WriteStartDocument to start writing the scope document).
-
DONE
public static final AbstractBsonWriter.State DONE
The writer is done.
-
CLOSED
public static final AbstractBsonWriter.State CLOSED
The writer is closed.
-
-
Method Detail
-
values
public static AbstractBsonWriter.State[] 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 (AbstractBsonWriter.State c : AbstractBsonWriter.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AbstractBsonWriter.State valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-