| Package | Description |
|---|---|
| net.morimekta.providence.util |
| Modifier and Type | Method and Description |
|---|---|
static <M extends PMessage<M>,E extends Exception> |
MessageValidation.builder(PMessageDescriptor<M> descriptor,
Function<Exception,E> onMismatch)
Create a message validator that throws specific exception on failure.
|
MessageValidation.Builder<M,E> |
MessageValidation.Builder.expect(MessageValidation.Expectation<M> expectation)
Make a specific expectation for the message.
|
MessageValidation.Builder<M,E> |
MessageValidation.Builder.expect(MessageValidation.SimpleExpectation<M> expectation)
Make a specific expectation for the message.
|
<V> MessageValidation.Builder<M,E> |
MessageValidation.Builder.expectIfPresent(PField<M> field,
MessageValidation.Expectation<V> valueExpectation)
Given the field and type descriptor (which must match the field type),
build an inner validator to check the value of the field.
|
<V> MessageValidation.Builder<M,E> |
MessageValidation.Builder.expectIfPresent(PField<M> field,
MessageValidation.SimpleExpectation<V> valueExpectation)
Given the field and type descriptor (which must match the field type),
build an inner validator to check the value of the field.
|
<M2 extends PMessage<M2>> |
MessageValidation.Builder.expectIfPresent(PField<M> field,
PMessageDescriptor<M2> descriptor,
Consumer<MessageValidation.Builder<M2,E>> builderConsumer)
Given the field and type descriptor (which must match the field type),
build an inner validator to check the value of the field.
|
MessageValidation.Builder<M,E> |
MessageValidation.Builder.expectMissing(PField<M>... fields)
Expect field to be present on message.
|
MessageValidation.Builder<M,E> |
MessageValidation.Builder.expectNotNull()
Expect the message to be non-null value.
|
MessageValidation.Builder<M,E> |
MessageValidation.Builder.expectPresent(PField<M>... fields)
Expect field to be present on message.
|
MessageValidation.Builder<M,E> |
MessageValidation.toBuilder()
Make a builder out of the current validation.
|
| Modifier and Type | Method and Description |
|---|---|
<M2 extends PMessage<M2>> |
MessageValidation.Builder.expectIfPresent(PField<M> field,
PMessageDescriptor<M2> descriptor,
Consumer<MessageValidation.Builder<M2,E>> builderConsumer)
Given the field and type descriptor (which must match the field type),
build an inner validator to check the value of the field.
|
Copyright © 2015–2020 morimekta.net. All rights reserved.