Enum SubArrayRequest.ArrayOperation
- java.lang.Object
-
- java.lang.Enum<SubArrayRequest.ArrayOperation>
-
- com.couchbase.client.core.message.kv.subdoc.simple.SubArrayRequest.ArrayOperation
-
- All Implemented Interfaces:
Serializable
,Comparable<SubArrayRequest.ArrayOperation>
- Enclosing class:
- SubArrayRequest
public static enum SubArrayRequest.ArrayOperation extends Enum<SubArrayRequest.ArrayOperation>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_UNIQUE
Add a value in an existing array unless the value already is present in the array.INSERT
Insert a value at a specific index into an existing array, shifting values at and after the given index.PUSH_FIRST
Prepend an existing array with a value.PUSH_LAST
Append a value to an existing array.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
opCode()
static SubArrayRequest.ArrayOperation
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubArrayRequest.ArrayOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUSH_FIRST
public static final SubArrayRequest.ArrayOperation PUSH_FIRST
Prepend an existing array with a value.
-
PUSH_LAST
public static final SubArrayRequest.ArrayOperation PUSH_LAST
Append a value to an existing array.
-
INSERT
public static final SubArrayRequest.ArrayOperation INSERT
Insert a value at a specific index into an existing array, shifting values at and after the given index.
-
ADD_UNIQUE
public static final SubArrayRequest.ArrayOperation ADD_UNIQUE
Add a value in an existing array unless the value already is present in the array. Existence of the value is tested via String comparison, and the array can only be containing primitive values.
-
-
Method Detail
-
values
public static SubArrayRequest.ArrayOperation[] 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 (SubArrayRequest.ArrayOperation c : SubArrayRequest.ArrayOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubArrayRequest.ArrayOperation 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
-
opCode
public byte opCode()
-
-