StringMismatch

public final class StringMismatch

Utility class for working with string values in ValueMismatches.

Functions

Link copied to clipboard
public static ValueMismatch expectedEmpty(String actual, String newValue, int version)
Creates ValueMismatch for the case of discovering a non-empty value, when an empty string was expected by a command.
Link copied to clipboard
public static ValueMismatch expectedNotEmpty(String expected, int version)
Creates a ValueMismatch for a command that wanted to clear a string value, but discovered that the field is already empty.
Link copied to clipboard
public static ValueMismatch unexpectedValue(String expected, String actual, String newValue, int version)
Creates ValueMismatch for the case of discovering a value different than expected by a command.
Link copied to clipboard
public static String unpackActual(ValueMismatch mismatch)
Obtains actual string from the passed mismatch.
Link copied to clipboard
public static String unpackExpected(ValueMismatch mismatch)
Obtains expected string from the passed mismatch.
Link copied to clipboard
public static String unpackNewValue(ValueMismatch mismatch)
Obtains new value string from the passed mismatch.