DoubleMismatch

public final class DoubleMismatch

Utility class for working with double values in ValueMismatches.

Functions

Link copied to clipboard
public static ValueMismatch expectedNonZero(double expected, double newValue, int version)
Creates ValueMismatch for the case of discovering zero value, when a non zero amount was expected by a command.
Link copied to clipboard
public static ValueMismatch expectedZero(double actual, double newValue, int version)
Creates ValueMismatch for the case of discovering not zero value, when a zero amount was expected by a command.
Link copied to clipboard
public static ValueMismatch of(double expected, double actual, double newValue, int version)
Creates a new instance of ValueMismatch with the passed values for a double attribute.
Link copied to clipboard
public static ValueMismatch unexpectedValue(double expected, double actual, double newValue, int version)
Creates ValueMismatch for the case of discovering a value different than by a command.
Link copied to clipboard
public static double unpackActual(ValueMismatch mismatch)
Obtains actual double value from the passed mismatch.
Link copied to clipboard
public static double unpackExpected(ValueMismatch mismatch)
Obtains expected double value from the passed mismatch.
Link copied to clipboard
public static double unpackNewValue(ValueMismatch mismatch)
Obtains new double value from the passed mismatch.