private MatchManyWrapper findMatchManyWrapper ( PatternWrapper pattern ) { MatchManyWrapper wrapper = null ; if ( matchManyChildren != null ) { // Iterate over the matchManyChildren Iterator iter = matchManyChildren . iterator ( ) ; while ( iter . hasNext ( ) ) { MatchManyWrapper nextElement = ( MatchManyWrapper ) iter . next ( ) ; PatternWrapper nextPattern = nextElement . pattern ; if ( nextPattern . equals ( pattern ) ) { // We're done, we've found the matching pattern wrapper = nextElement ; break ; } } // eof while more children in the list } return wrapper ; }
Locates a wrapped pattern + matcher pair where we ve been give a pattern .