T
- type of constantpublic class ExpectConstant<T> extends Object implements ValuePredicate<T>
Constructor and Description |
---|
ExpectConstant(T constant,
ValuePredicate<T> successor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(T expected,
T actual)
Returns
true iff both values satisfy this predicate. |
String |
describeExpected(T expected,
T actual)
Returns an expected value as readable text.
|
public ExpectConstant(T constant, ValuePredicate<T> successor)
constant
- expected constant (nullable)successor
- expecting constantIllegalArgumentException
- if some parameters were null
public boolean accepts(T expected, T actual)
ValuePredicate
true
iff both values satisfy this predicate.accepts
in interface ValuePredicate<T>
expected
- the expected value (nullable)actual
- the actual value (nullable)true
iff both values satisfy this predicate, false
otherwise.public String describeExpected(T expected, T actual)
ValuePredicate
describeExpected
in interface ValuePredicate<T>
expected
- the expected value (nullable)actual
- the actual value (nullable)null
if is always/never expectedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.