public class ListValueMatcher extends java.lang.Object implements ValueMatcher, IgnoreNullTransform, IgnoreFieldTransform
ValueMatcher
which uses the Object.equals(Object)
method to
determine a match.Constructor and Description |
---|
ListValueMatcher(java.util.List<? extends ValueMatcher> expected) |
Modifier and Type | Method and Description |
---|---|
com.google.gson.JsonElement |
describe(com.google.gson.Gson gson)
get a description of the matcher suitable
for use in error messages.
|
ValueMatcher |
ignoreField(java.lang.String field)
|
ValueMatcher |
ignoreNulls()
get a
ValueMatcher like this but that will
ignore sub-values that are null. |
boolean |
matches(java.lang.Object actual)
determine whether or not a value matches
|
public ListValueMatcher(java.util.List<? extends ValueMatcher> expected)
public boolean matches(java.lang.Object actual) throws com.streambase.sb.TupleException
ValueMatcher
matches
in interface ValueMatcher
com.streambase.sb.TupleException
public ValueMatcher ignoreNulls()
IgnoreNullTransform
ValueMatcher
like this
but that will
ignore sub-values that are null. If the result would be a trivial
ValueMatcher
, return null
instead.ignoreNulls
in interface IgnoreNullTransform
public ValueMatcher ignoreField(java.lang.String field)
IgnoreFieldTransform
ValueMatcher
like this
but that will
ignore sub-fields with the name field
. If the result
would be a trivial ValueMatcher
, return null
instead.ignoreField
in interface IgnoreFieldTransform
field
- The field to ignorepublic com.google.gson.JsonElement describe(com.google.gson.Gson gson)
ValueMatcher
describe
in interface ValueMatcher