Class AbstractVariantOperations
java.lang.Object
org.pipservices3.expressions.variants.AbstractVariantOperations
- All Implemented Interfaces:
IVariantOperations
- Direct Known Subclasses:
TypeSafeVariantOperations
,TypeUnsafeVariantOperations
Implements an abstractd variant operations manager object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms '+' operation for two variants.Performs AND operation for two variants.abstract Variant
convert
(Variant value, VariantType newType) Converts variant to specified typePerforms '/' operation for two variants.Performs '=' operation for two variants.getElement
(Variant value1, Variant value2) Performs [] operation for two variants.Performs IN operation for two variants.Performs '<' operation for two variants.Performs '<=' operation for two variants.Performs '<<' operation for two variants.Performs '%' operation for two variants.Performs '>' operation for two variants.Performs '>=' operation for two variants.Performs '*' operation for two variants.Performs unary '-' operation for a variant.Performs NOT operation for a variant.Performs '<>' operation for two variants.Performs OR operation for two variants.Performs '^' operation for two variants.Performs '>>' operation for two variants.Performs '-' operation for two variants.protected String
typeToString
(VariantType value) Convert variant type to string representationPerforms XOR operation for two variants.
-
Constructor Details
-
AbstractVariantOperations
public AbstractVariantOperations()
-
-
Method Details
-
typeToString
Convert variant type to string representation- Parameters:
value
- a variant type to be converted.- Returns:
- a string representation of the type.
-
convert
Converts variant to specified type- Specified by:
convert
in interfaceIVariantOperations
- Parameters:
value
- A variant value to be converted.newType
- A type of object to be returned.- Returns:
- A converted Variant value.
-
add
Performs '+' operation for two variants.- Specified by:
add
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
sub
Performs '-' operation for two variants.- Specified by:
sub
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
mul
Performs '*' operation for two variants.- Specified by:
mul
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
div
Performs '/' operation for two variants.- Specified by:
div
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
mod
Performs '%' operation for two variants.- Specified by:
mod
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
pow
Performs '^' operation for two variants.- Specified by:
pow
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
and
Performs AND operation for two variants.- Specified by:
and
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
or
Performs OR operation for two variants.- Specified by:
or
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
xor
Performs XOR operation for two variants.- Specified by:
xor
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
lsh
Performs '<<' operation for two variants.- Specified by:
lsh
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
rsh
Performs '>>' operation for two variants.- Specified by:
rsh
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
not
Performs NOT operation for a variant.- Specified by:
not
in interfaceIVariantOperations
- Parameters:
value
- The operand for this operation.- Returns:
- A result variant object.
-
negative
Performs unary '-' operation for a variant.- Specified by:
negative
in interfaceIVariantOperations
- Parameters:
value
- The operand for this operation.- Returns:
- A result variant object.
-
equal
Performs '=' operation for two variants.- Specified by:
equal
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
notEqual
Performs '<>' operation for two variants.- Specified by:
notEqual
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
more
Performs '>' operation for two variants.- Specified by:
more
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
less
Performs '<' operation for two variants.- Specified by:
less
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
moreEqual
Performs '>=' operation for two variants.- Specified by:
moreEqual
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
lessEqual
Performs '<=' operation for two variants.- Specified by:
lessEqual
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
in
Performs IN operation for two variants.- Specified by:
in
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
-
getElement
Performs [] operation for two variants.- Specified by:
getElement
in interfaceIVariantOperations
- Parameters:
value1
- The first operand for this operation.value2
- The second operand for this operation.- Returns:
- A result variant object.
- Throws:
Exception
-