public final class BooleanMismatch
extends java.lang.Object
boolean
values in ValueMismatch
es.Modifier and Type | Method and Description |
---|---|
static io.spine.change.ValueMismatch |
expectedFalse(int version)
Creates
ValueMismatch for the case when command finds true value instead of false. |
static io.spine.change.ValueMismatch |
expectedTrue(int version)
Creates
ValueMismatch for the case when command finds false value instead of true. |
static boolean |
unpackActual(io.spine.change.ValueMismatch mismatch)
Obtains actual boolean value from the passed mismatch.
|
static boolean |
unpackExpected(io.spine.change.ValueMismatch mismatch)
Obtains expected boolean value from the passed mismatch.
|
static boolean |
unpackNewValue(io.spine.change.ValueMismatch mismatch)
Obtains new boolean value from the passed mismatch.
|
public static io.spine.change.ValueMismatch expectedTrue(int version)
ValueMismatch
for the case when command finds false value instead of true.version
- the version of the entity in which the mismatch is discoveredValueMismatch
instancepublic static io.spine.change.ValueMismatch expectedFalse(int version)
ValueMismatch
for the case when command finds true value instead of false.version
- the version of the entity in which the mismatch is discoveredValueMismatch
instancepublic static boolean unpackExpected(io.spine.change.ValueMismatch mismatch)
java.lang.RuntimeException
- if the passed instance represent a mismatch of non-boolean valuespublic static boolean unpackActual(io.spine.change.ValueMismatch mismatch)
java.lang.RuntimeException
- if the passed instance represent a mismatch of non-boolean valuespublic static boolean unpackNewValue(io.spine.change.ValueMismatch mismatch)
java.lang.RuntimeException
- if the passed instance represent a mismatch of non-boolean values