@Override protected boolean matchesSafely(T object) { return !matcher.matches(object); } };
/** * Returns true if this object matches successfully. * <p> * This method checks for a type match against the erased type of this matcher * and then defers to the {@link #matchesSafely(Object)} of this matcher with the * type-checked and cast object. * * @param object object to be checked * @return {@code true} if the object matches */ public final boolean matches(Object object) { if (boundType.isAssignableFrom(object.getClass())) { return matchesSafely(boundType.cast(object)); } else { return false; } }
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(object)) { return true; } } return false; } };
/** * Returns true if this object matches successfully. * <p> * This method checks for a type match against the erased type of this matcher * and then defers to the {@link #matchesSafely(Object)} of this matcher with the * type-checked and cast object. * * @param object object to be checked * @return {@code true} if the object matches */ public final boolean matches(Object object) { return boundType.isAssignableFrom(object.getClass()) && matchesSafely(boundType.cast(object)); }
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (!matcher.matches(object)) { return false; } } return true; } };
/** * Returns true if this object matches successfully. * <p> * This method checks for a type match against the erased type of this matcher * and then defers to the {@link #matchesSafely(Object)} of this matcher with the * type-checked and cast object. * * @param object object to be checked * @return {@code true} if the object matches */ public final boolean matches(Object object) { if (boundType.isAssignableFrom(object.getClass())) { return matchesSafely(boundType.cast(object)); } else { return false; } }
@Override protected boolean matchesSafely(Map<String, Object> object) { return object.containsKey(key) && value.matches(object.get(key)); } };
/** * Returns true if this object matches successfully. * <p> * This method checks for a type match against the erased type of this matcher * and then defers to the {@link #matchesSafely(Object)} of this matcher with the * type-checked and cast object. * * @param object object to be checked * @return {@code true} if the object matches */ public final boolean matches(Object object) { if (boundType.isAssignableFrom(object.getClass())) { return matchesSafely(boundType.cast(object)); } else { return false; } }
@Override public Set<TreeNode> execute(Set<TreeNode> input) { Set<TreeNode> output = new HashSet<TreeNode>(input); for (Iterator<TreeNode> it = output.iterator(); it.hasNext(); ) { if (!filter.matches(it.next())) { it.remove(); } } return output; }
@Override protected boolean matchesSafely(TreeNode t) { return matcher.matches(t.getContext()); }
@Override protected boolean matchesSafely(ContextElement t) { return matcher.matches(t.attributes()); }
@Override protected boolean matchesSafely(ContextElement t) { return matcher.matches(t.identifier()); }
@Override protected boolean matchesSafely(T object) { return !matcher.matches(object); } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (!matcher.matches(object)) { return false; } } return true; } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(object)) { return true; } } return false; } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (!matcher.matches(object)) { return false; } } return true; } };
@Override protected boolean matchesSafely(T object) { return !matcher.matches(object); } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(object)) { return true; } } return false; } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (!matcher.matches(object)) { return false; } } return true; } };
@Override protected boolean matchesSafely(T object) { for (Matcher<? super T> matcher : matchers) { if (matcher.matches(object)) { return true; } } return false; } };