public class NullValueMatcher extends java.lang.Object implements ValueMatcher, IgnoreNullTransform
ValueMatcher
which matches non-null
values.Constructor and Description |
---|
NullValueMatcher() |
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 |
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 boolean matches(java.lang.Object actual)
ValueMatcher
matches
in interface ValueMatcher
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 com.google.gson.JsonElement describe(com.google.gson.Gson gson)
ValueMatcher
describe
in interface ValueMatcher