Package com.google.common.truth
Class DoubleSubject.TolerantDoubleComparison
- java.lang.Object
-
- com.google.common.truth.DoubleSubject.TolerantDoubleComparison
-
- Enclosing class:
- DoubleSubject
public static final class DoubleSubject.TolerantDoubleComparison extends Object
A partially specified check about an approximate relationship to adoublevalue using a tolerance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(@Nullable Object other)Deprecated.Object.equals(Object)is not supported on TolerantDoubleComparison.inthashCode()Deprecated.Object.hashCode()is not supported on TolerantDoubleComparisonvoidof(double other)Checks that the actual value is within the tolerance of the given value or not within the tolerance of the given value, depending on the choice made earlier in the fluent call chain.
-
-
-
Method Detail
-
of
public void of(double other)
Checks that the actual value is within the tolerance of the given value or not within the tolerance of the given value, depending on the choice made earlier in the fluent call chain. The actual value and tolerance are also specified earlier in the fluent call chain.
-
equals
@Deprecated public boolean equals(@Nullable Object other)
Deprecated.Object.equals(Object)is not supported on TolerantDoubleComparison. If you meant to compare doubles, useof(double)instead.- Overrides:
equalsin classObject- Throws:
UnsupportedOperationException- always
-
hashCode
@Deprecated public int hashCode()
Deprecated.Object.hashCode()is not supported on TolerantDoubleComparison- Overrides:
hashCodein classObject- Throws:
UnsupportedOperationException- always
-
-