nl_tokens: Suffix matches are matches of type * / x / y
pl_tokens: List < Action > suffixMatch ( ElementPath elementPath ) { int <mask> = 0 ; ElementSelector longestMatchingElementSelector = null ; for ( ElementSelector selector : rules . keySet ( ) ) { if ( isSuffixPattern ( selector ) ) { int r = selector . getTailMatchLength ( elementPath ) ; if ( r > max ) { max = r ; longestMatchingElementSelector = selector ; } } } if ( longestMatchingElementSelector != null ) { return rules . get ( longestMatchingElementSelector ) ; } else { return null ; } }