public static boolean haveSeenLast(final List<TokenType> tokenTypeSequence,
                                       final TokenType... tokenTypes) {
        if (NullSafe.isEmptyCollection(tokenTypeSequence)) {
            return false;
        } else if (NullSafe.isEmptyArray(tokenTypes)) {
            return true;
        } else if (tokenTypeSequence.size() < tokenTypes.length) {
            return false;
        } else {
            int seqIdx = tokenTypeSequence.size() - 1;
            for (int i = tokenTypes.length - 1; i >= 0; i--) {
                if (tokenTypeSequence.get(seqIdx--) != tokenTypes[i]) {
                    return false;
                }
            }
            return true;
        }
    }
@return True if tokenTypes are the last contiguous sequence of {@link TokenType}s
seen at the end of tokenTypeSequence.
stroom-query/stroom-query-api/src/main/java/stroom/query/api/token/TokenType.java