Class AbstractVariantOperations

    • Constructor Detail

      • AbstractVariantOperations

        public AbstractVariantOperations()
    • Method Detail

      • typeToString

        protected String typeToString​(VariantType value)
        Convert variant type to string representation
        Parameters:
        value - a variant type to be converted.
        Returns:
        a string representation of the type.
      • convert

        public abstract Variant convert​(Variant value,
                                        VariantType newType)
        Converts variant to specified type
        Specified by:
        convert in interface IVariantOperations
        Parameters:
        value - A variant value to be converted.
        newType - A type of object to be returned.
        Returns:
        A converted Variant value.
      • add

        public Variant add​(Variant value1,
                           Variant value2)
        Performs '+' operation for two variants.
        Specified by:
        add in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • sub

        public Variant sub​(Variant value1,
                           Variant value2)
        Performs '-' operation for two variants.
        Specified by:
        sub in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • mul

        public Variant mul​(Variant value1,
                           Variant value2)
        Performs '*' operation for two variants.
        Specified by:
        mul in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • div

        public Variant div​(Variant value1,
                           Variant value2)
        Performs '/' operation for two variants.
        Specified by:
        div in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • mod

        public Variant mod​(Variant value1,
                           Variant value2)
        Performs '%' operation for two variants.
        Specified by:
        mod in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • pow

        public Variant pow​(Variant value1,
                           Variant value2)
        Performs '^' operation for two variants.
        Specified by:
        pow in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • and

        public Variant and​(Variant value1,
                           Variant value2)
        Performs AND operation for two variants.
        Specified by:
        and in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • or

        public Variant or​(Variant value1,
                          Variant value2)
        Performs OR operation for two variants.
        Specified by:
        or in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • xor

        public Variant xor​(Variant value1,
                           Variant value2)
        Performs XOR operation for two variants.
        Specified by:
        xor in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • lsh

        public Variant lsh​(Variant value1,
                           Variant value2)
        Performs '<<' operation for two variants.
        Specified by:
        lsh in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • rsh

        public Variant rsh​(Variant value1,
                           Variant value2)
        Performs '>>' operation for two variants.
        Specified by:
        rsh in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • not

        public Variant not​(Variant value)
        Performs NOT operation for a variant.
        Specified by:
        not in interface IVariantOperations
        Parameters:
        value - The operand for this operation.
        Returns:
        A result variant object.
      • negative

        public Variant negative​(Variant value)
        Performs unary '-' operation for a variant.
        Specified by:
        negative in interface IVariantOperations
        Parameters:
        value - The operand for this operation.
        Returns:
        A result variant object.
      • equal

        public Variant equal​(Variant value1,
                             Variant value2)
        Performs '=' operation for two variants.
        Specified by:
        equal in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • notEqual

        public Variant notEqual​(Variant value1,
                                Variant value2)
        Performs '<>' operation for two variants.
        Specified by:
        notEqual in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • more

        public Variant more​(Variant value1,
                            Variant value2)
        Performs '>' operation for two variants.
        Specified by:
        more in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • less

        public Variant less​(Variant value1,
                            Variant value2)
        Performs '<' operation for two variants.
        Specified by:
        less in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • moreEqual

        public Variant moreEqual​(Variant value1,
                                 Variant value2)
        Performs '>=' operation for two variants.
        Specified by:
        moreEqual in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • lessEqual

        public Variant lessEqual​(Variant value1,
                                 Variant value2)
        Performs '<=' operation for two variants.
        Specified by:
        lessEqual in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • in

        public Variant in​(Variant value1,
                          Variant value2)
        Performs IN operation for two variants.
        Specified by:
        in in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
      • getElement

        public Variant getElement​(Variant value1,
                                  Variant value2)
                           throws Exception
        Performs [] operation for two variants.
        Specified by:
        getElement in interface IVariantOperations
        Parameters:
        value1 - The first operand for this operation.
        value2 - The second operand for this operation.
        Returns:
        A result variant object.
        Throws:
        Exception