MessageMismatch

public final class MessageMismatch

Utility class for working with ValueMismatches for Message values.

Functions

Link copied to clipboard
public static ValueMismatch expectedDefault(Message actual, Message newValue, int version)
Creates ValueMismatch for the case of discovering a non-default value, when the default value was expected by a command.
Link copied to clipboard
public static ValueMismatch expectedNotDefault(Message expected, int version)
Creates a ValueMismatch for a command that wanted to clear a value, but discovered that the field already has the default value.
public static ValueMismatch expectedNotDefault(Message expected, Message newValue, int version)
Creates a ValueMismatch for a command that wanted to change a field value, but discovered that the field has the default value.
Link copied to clipboard
public static ValueMismatch unexpectedValue(Message expected, Message actual, Message newValue, int version)
Creates ValueMismatch for the case of discovering a value different than by a command.
Link copied to clipboard
public static Message unpackActual(ValueMismatch mismatch)
Obtains actual value as a Message from the passed mismatch.
Link copied to clipboard
public static Message unpackExpected(ValueMismatch mismatch)
Obtains expected value as a Message from the passed mismatch.
Link copied to clipboard
public static Message unpackNewValue(ValueMismatch mismatch)
Obtains new value as a Message from the passed mismatch.