Class DeepEqual


  • public final class DeepEqual
    extends Object
    Utility class for comparing XQuery values.
    Author:
    BaseX Team 2005-24, BSD License, Christian Gruen
    • Field Detail

      • info

        public final InputInfo info
        Input info (can be null).
      • qc

        public final QueryContext qc
        Query context (to interrupt process, can be null).
      • coll

        public final Collation coll
        Collation.
      • itemsEqual

        public FItem itemsEqual
        Comparison function.
      • nested

        public boolean nested
        Flag for nested node comparisons.
    • Constructor Detail

      • DeepEqual

        public DeepEqual()
        Constructor.
      • DeepEqual

        public DeepEqual​(InputInfo info)
        Constructor.
        Parameters:
        info - input info (can be null)
      • DeepEqual

        public DeepEqual​(InputInfo info,
                         Collation coll,
                         QueryContext qc)
        Constructor.
        Parameters:
        info - input info (can be null)
        coll - collation (can be null)
        qc - query context (to interrupt process, can be null)
      • DeepEqual

        public DeepEqual​(InputInfo info,
                         Collation coll,
                         QueryContext qc,
                         DeepEqualOptions options)
        Constructor.
        Parameters:
        info - input info (can be null)
        coll - collation (can be null)
        qc - query context (can be null)
        options - options (can be null)
    • Method Detail

      • equal

        public boolean equal​(Value value1,
                             Value value2)
                      throws QueryException
        Checks values for deep equality.
        Parameters:
        value1 - first value
        value2 - second value
        Returns:
        result of check
        Throws:
        QueryException - query exception
      • equal

        public boolean equal​(Iter iter1,
                             Iter iter2)
                      throws QueryException
        Checks iterated values for deep equality.
        Parameters:
        iter1 - first iterator
        iter2 - second iterator
        Returns:
        result of check
        Throws:
        QueryException - query exception
      • equal

        public boolean equal​(Item item1,
                             Item item2)
                      throws QueryException
        Checks items for deep equality.
        Parameters:
        item1 - first item
        item2 - second item
        Returns:
        result of check
        Throws:
        QueryException - query exception
      • itemsEqual

        public Bln itemsEqual​(Item item1,
                              Item item2)
                       throws QueryException
        Checks items for deep equality.
        Parameters:
        item1 - first item
        item2 - second item
        Returns:
        result of check
        Throws:
        QueryException - query exception