public static < V > Node < V > findLastNode ( List < Node < V > > parents , Predicate < Node < V > > predicate ) { checkArgNotNull ( predicate , "predicate" ) ; if ( parents != null && ! parents . isEmpty ( ) ) { int parentsSize = parents . size ( ) ; for ( int i = parentsSize - 1 ; i >= 0 ; i -- ) { Node < V > found = findLastNode ( parents . get ( i ) , predicate ) ; if ( found != null ) return found ; } } return null ; }
Returns the last node underneath the given parents for which the given predicate evaluates to true . If parents is null or empty or no node is found the method returns null .