static boolean elementSelectorMatches(final Selector s, final Element e, final ElementMatcher matcher, final MatchCondition matchCond) { return s.matches(e, matcher, matchCond); }
protected boolean elementSelectorMatches(final Selector s, final Element e) { return s.matches(e, matcher, matchCond); }
protected boolean elementSelectorMatches(final Selector s, final Element e) { return s.matches(e, matcher, matchCond); }
static boolean elementSelectorMatches(final Selector s, final Element e, final ElementMatcher matcher, final MatchCondition matchCond) { return s.matches(e, matcher, matchCond); }
private static boolean nodeSelectorMatches(final Selector s, final Node n, final ElementMatcher matcher, final MatchCondition matchCond) { if (n.getNodeType() == Node.ELEMENT_NODE) { return s.matches((Element) n, matcher, matchCond); } else { return false; } }
private static boolean nodeSelectorMatches(final Selector s, final Node n, final ElementMatcher matcher, final MatchCondition matchCond) { if (n.getNodeType() == Node.ELEMENT_NODE) { return s.matches((Element) n, matcher, matchCond); } else { return false; } }
retval = s.matches(e); } else if (combinator == Selector.Combinator.ADJACENT) { Node adjacent = e.getPreviousSibling(); retval = false; if (adjacent != null && adjacent.getNodeType() == Node.ELEMENT_NODE) retval = s.matches((Element) adjacent); } else if (combinator == Selector.Combinator.DESCENDANT) { Node ancestor = e.getParentNode(); if (ancestor.getNodeType() == Node.ELEMENT_NODE && s.matches((Element) ancestor)) retval = true; else retval = false; if (parent != null && parent.getNodeType() == Node.ELEMENT_NODE) retval = s.matches((Element) parent);
retval = s.matches(e); } else if (combinator == Selector.Combinator.ADJACENT) { Element adjacent = (Element) w.previousSibling(); retval = false; if (adjacent != null) retval = s.matches(adjacent); } else if (combinator == Selector.Combinator.PRECEDING) { Element preceding; retval = false; while (!retval && (preceding = (Element) w.previousSibling()) != null) { retval = s.matches(preceding); retval = false; while (!retval && (ancestor = (Element) w.parentNode()) != null) { retval = s.matches(ancestor); retval = false; if (parent != null) retval = s.matches(parent);
return nestedSelector != null && !nestedSelector.matches(e, matcher, cond); default:
case NOT: if (selector != null) { return !selector.matches(e, matcher, cond); } else if (value != null) { final ElementName sel = new ElementNameImpl(value);