Class Equivalence.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withStrict

        public Equivalence.Builder withStrict​(boolean isStrict)
        When true, checks for strict data equivalence over two Ion Values. When false, checks for structural data equivalence over two Ion Values. See Equivalence for discussion of the differences between the two. Default: true.
        Parameters:
        isStrict - the value.
        Returns:
        this builder.
      • withEpsilon

        public Equivalence.Builder withEpsilon​(double epsilon)
        The maximum absolute difference between two Ion float values for which the two values will be considered equivalent. Default: Ion float values will only be considered equivalent when Double.compare(a, b) == 0.
        Parameters:
        epsilon - the value.
        Returns:
        this builder.
      • withMaxComparisonDepth

        public Equivalence.Builder withMaxComparisonDepth​(int maxComparisonDepth)
        The maximum depth to which two values will be compared. If the two values to be compared are still potentially equivalent beyond this depth, Equivalence.ionValueEquals(IonValue, IonValue) will throw an IonException.
        Parameters:
        maxComparisonDepth - the value.
        Returns:
        this builder.
      • build

        public Equivalence build()
        Returns:
        a new Equivalence using this builder's configuration.