LongMismatch

public final class LongMismatch

Utility class for working with long values in ValueMismatches.

Functions

Link copied to clipboard
public static ValueMismatch expectedNonZero(long expected, long 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(long actual, long 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(long expected, long actual, long newValue, int version)
Creates a new instance of ValueMismatch with the passed values for a long attribute.
Link copied to clipboard
public static ValueMismatch unexpectedValue(long expected, long actual, long newValue, int version)
Creates ValueMismatch for the case of discovering a value different than by a command.
Link copied to clipboard
public static long unpackActual(ValueMismatch mismatch)
Obtains actual long value from the passed mismatch.
Link copied to clipboard
public static long unpackExpected(ValueMismatch mismatch)
Obtains expected long value from the passed mismatch.
Link copied to clipboard
public static long unpackNewValue(ValueMismatch mismatch)
Obtains new long value from the passed mismatch.