Package com.amazon.ion.util
Class Equivalence.Builder
- java.lang.Object
-
- com.amazon.ion.util.Equivalence.Builder
-
- Enclosing class:
- Equivalence
public static final class Equivalence.Builder extends java.lang.Object
ConstructsEquivalence
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Equivalence
build()
Equivalence.Builder
withEpsilon(double epsilon)
The maximum absolute difference between two Ion float values for which the two values will be considered equivalent.Equivalence.Builder
withStrict(boolean isStrict)
When true, checks for strict data equivalence over two Ion Values.
-
-
-
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. SeeEquivalence
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 whenDouble.compare(a, b) == 0
.- Parameters:
epsilon
- the value.- Returns:
- this builder.
-
build
public Equivalence build()
- Returns:
- a new Equivalence using this builder's configuration.
-
-