return new MatchAny(ImmutableList.of(this, other));
}
- public abstract boolean test(@Nullable NormalizedNode<?, ?> data);
+ public abstract boolean test(@Nullable NormalizedNode data);
final void appendTo(final StringBuilder sb) {
sb.append(op()).append('(');
}
@Override
- public boolean test(final @Nullable NormalizedNode<?, ?> data) {
+ public boolean test(final @Nullable NormalizedNode data) {
for (Match component : components()) {
if (!component.test(data)) {
return false;
}
@Override
- public boolean test(final @Nullable NormalizedNode<?, ?> data) {
+ public boolean test(final @Nullable NormalizedNode data) {
for (Match component : components()) {
if (component.test(data)) {
return true;
}
@Override
- public boolean test(final @Nullable NormalizedNode<?, ?> data) {
+ public boolean test(final @Nullable NormalizedNode data) {
return data != null;
}
}
@Override
- public boolean test(final @Nullable NormalizedNode<?, ?> data) {
+ public boolean test(final @Nullable NormalizedNode data) {
return !match.test(data);
}
}
@Override
- public final boolean test(final @Nullable NormalizedNode<?, ?> data) {
- return data instanceof LeafNode ? testValue(((LeafNode<?>) data).getValue()) : testValue(null);
+ public final boolean test(final @Nullable NormalizedNode data) {
+ return data instanceof LeafNode ? testValue(((LeafNode<?>) data).body()) : testValue(null);
}
abstract boolean testValue(@Nullable Object data);