boolean endsWith ( final Literal literal ) { // Check whether the answer is already in the cache final int index = literal . getIndex ( ) ; final Boolean cached = myPostfixCache . get ( index ) ; if ( cached != null ) { return cached . booleanValue ( ) ; } // Get the answer and cache the result final boolean result = literal . matches ( myChars , myChars . length - literal . getLength ( ) ) ; myPostfixCache . set ( index , result ) ; return result ; }
Indicates whether this instance ends with the specified postfix .