getAncestor<E extends Element> method

E getAncestor <E extends Element>(
  1. Predicate<Element> predicate
)

Return the most immediate ancestor of this element for which the predicate returns true, or null if there is no such ancestor. Note that this element will never be returned.

Implementation

E getAncestor<E extends Element>(Predicate<Element> predicate);