Package net.morimekta.providence.util
Interface MessageValidation.SimpleExpectation<V>
-
- Type Parameters:
V
- The value type that is tested.
- All Superinterfaces:
MessageValidation.Expectation<V>
- All Known Implementing Classes:
MessageValidation.PredicateExpectation
- Enclosing class:
- MessageValidation<M extends PMessage<M>,E extends java.lang.Exception>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface MessageValidation.SimpleExpectation<V> extends MessageValidation.Expectation<V>
Interface for testing some expectation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
test(java.lang.String path, V value)
Test the expectation at a specific path in the structure.void
test(V value)
Test the expectation.
-
-
-
Method Detail
-
test
void test(V value) throws java.lang.Exception
Test the expectation.- Parameters:
value
- The value to be tested.- Throws:
java.lang.Exception
- On any unmet expectation or other errors.
-
test
default void test(java.lang.String path, V value) throws java.lang.Exception
Test the expectation at a specific path in the structure.- Specified by:
test
in interfaceMessageValidation.Expectation<V>
- Parameters:
path
- The path to the current location.value
- The value to be tested.- Throws:
java.lang.Exception
- On validation failure.
-
-