IntMismatch

public final class IntMismatch

Utility class for working with int values in ValueMismatches.

Functions

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