Package org.apache.juneau.assertions
Class AssertionPredicate<T>
java.lang.Object
org.apache.juneau.assertions.AssertionPredicate<T>
- Type Parameters:
- T- the type of input being tested.
- All Implemented Interfaces:
- Predicate<T>
- Direct Known Subclasses:
- AssertionPredicate.And,- AssertionPredicate.Not,- AssertionPredicate.Or
Wrapper around a 
Predicate that allows for an error message for when the predicate fails.
 
 Typically used wherever predicates are allowed for testing of Assertion objects such as...
 
- FluentObjectAssertion.is(Predicate)
- FluentArrayAssertion.is(Predicate...)
- FluentPrimitiveArrayAssertion.is(Predicate...)
- FluentListAssertion.isEach(Predicate...)
 See AssertionPredicates for a set of predefined predicates for common use cases.
 
Example:
   
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classEncapsulates multiple predicates into a single AND operation.static classNegates an assertion.static classEncapsulates multiple predicates into a single OR operation.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionAssertionPredicate(Predicate<T> inner, String message, Object... args) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringReturns the error message from the last call to this assertion.boolean
- 
Field Details- 
VALUEArgument placeholder for tested value.
 
- 
- 
Constructor Details- 
AssertionPredicateConstructor.- Parameters:
- inner- The predicate test.
- message- The error message if predicate fails.
 Supports- MessageFormat-style arguments.
- args- Optional message arguments.
 Can contain- VALUEto specify the value itself as an argument.
 Can contain- functionsto apply to the tested value.
 
 
- 
- 
Method Details