Package com.im.df.api.ddl
Enum DFListOperationType
- java.lang.Object
-
- java.lang.Enum<DFListOperationType>
-
- com.im.df.api.ddl.DFListOperationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DFListOperationType>
public enum DFListOperationType extends java.lang.Enum<DFListOperationType>
Enum for list operations - set operations, inversion and sorting.- Since:
- 15.11.16.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description A_AND_NOT_B
Set difference.AND
Set intersection.B_AND_NOT_A
Set difference.INVERT
Reverse list order.OR
Set union.SORT_ASC
Sort in ascending order.SORT_DESC
Sort in descending order.XOR
Set XOR.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isBinaryOperation()
Tests for binary operation, which accepts only 2 operands.boolean
isNaryOperation()
Tests for n-ary operation, which accepts 2 or more operands.boolean
isUnaryOperation()
Tests for unary operation, which accepts only 1 operand.boolean
isValid(int operands)
Tests if operation is valid for given number of operands.static java.util.List<DFListOperationType>
validOperations(int operands)
Returns all operations defined for given number of operands.static DFListOperationType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DFListOperationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OR
public static final DFListOperationType OR
Set union.
-
AND
public static final DFListOperationType AND
Set intersection.
-
XOR
public static final DFListOperationType XOR
Set XOR.
-
A_AND_NOT_B
public static final DFListOperationType A_AND_NOT_B
Set difference.
-
B_AND_NOT_A
public static final DFListOperationType B_AND_NOT_A
Set difference.
-
INVERT
public static final DFListOperationType INVERT
Reverse list order.
-
SORT_ASC
public static final DFListOperationType SORT_ASC
Sort in ascending order.
-
SORT_DESC
public static final DFListOperationType SORT_DESC
Sort in descending order.
-
-
Method Detail
-
values
public static DFListOperationType[] 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 (DFListOperationType c : DFListOperationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DFListOperationType 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
-
isUnaryOperation
public boolean isUnaryOperation()
Tests for unary operation, which accepts only 1 operand.- Returns:
true
if unary operation, otherwisefalse
.
-
isBinaryOperation
public boolean isBinaryOperation()
Tests for binary operation, which accepts only 2 operands.- Returns:
true
if binary operation, otherwisefalse
.
-
isNaryOperation
public boolean isNaryOperation()
Tests for n-ary operation, which accepts 2 or more operands.- Returns:
true
if n-ary operation, otherwisefalse
.
-
isValid
public boolean isValid(int operands)
Tests if operation is valid for given number of operands.- Parameters:
operands
- number of operands- Returns:
true
if operation is defined for given number of operands, otherwisefalse
-
validOperations
public static java.util.List<DFListOperationType> validOperations(int operands)
Returns all operations defined for given number of operands.- Parameters:
operands
- number of operands- Returns:
- list of all operations defined for given number of operands
-
-