Package com.yahoo.document.update
Enum ArithmeticValueUpdate.Operator
- java.lang.Object
-
- java.lang.Enum<ArithmeticValueUpdate.Operator>
-
- com.yahoo.document.update.ArithmeticValueUpdate.Operator
-
- All Implemented Interfaces:
Serializable
,Comparable<ArithmeticValueUpdate.Operator>
- Enclosing class:
- ArithmeticValueUpdate
public static enum ArithmeticValueUpdate.Operator extends Enum<ArithmeticValueUpdate.Operator>
Lists valid operations that can be performed by an ArithmeticValueUpdate.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArithmeticValueUpdate.Operator
getID(int id)
Returns the operator with the specified ID.static ArithmeticValueUpdate.Operator
valueOf(String name)
Returns the enum constant of this type with the specified name.static ArithmeticValueUpdate.Operator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD
public static final ArithmeticValueUpdate.Operator ADD
Add the operand to the value.
-
DIV
public static final ArithmeticValueUpdate.Operator DIV
Divide the value by the operand.
-
MUL
public static final ArithmeticValueUpdate.Operator MUL
Multiply the value by the operand.
-
SUB
public static final ArithmeticValueUpdate.Operator SUB
Subtract the operand from the value.
-
-
Field Detail
-
id
public final int id
The numeric ID of the operator, used for serialization.
-
name
public final String name
The name of the operator, mainly used in toString() methods.
-
-
Method Detail
-
values
public static ArithmeticValueUpdate.Operator[] 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 (ArithmeticValueUpdate.Operator c : ArithmeticValueUpdate.Operator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArithmeticValueUpdate.Operator 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
-
getID
public static ArithmeticValueUpdate.Operator getID(int id)
Returns the operator with the specified ID.- Parameters:
id
- the ID to search for- Returns:
- the Operator with the specified ID, or null if it does not exist.
-
-