Indicates whether this instance ends with the specified postfix.
@param literal The postfix that should be tested
@return <code>true</code> if the argument represents the postfix of this instance, <code>false</code> otherwise.
322277
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;
    }
381885
public static boolean isSignedInteger(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        try {
            Integer.parseInt(s);

            return true;
        } catch (Exception e) {
            return false;
        }

        // int startPos = 0;
        // boolean secondArg = defaultEmptyOK;

        // if(isSignedInteger.arguments.length > 1) secondArg = isSignedInteger.arguments[1];

        // skip leading + or -
        // if((s.charAt(0) == "-") ||(s.charAt(0) == "+") ) startPos = 1;
        // return(isInteger(s.substring(startPos, s.length), secondArg))
    }
324281
public static boolean endsWithIgnoreCase(String str, String suffix) {
        if (str == null || suffix == null)
            return false;

        int strLength = str.length();
        int suffixLength = suffix.length();

        // return false if the string is smaller than the suffix.
        if (strLength < suffixLength)
            return false;

        // perform regionMatch with ignorecase
        if (str.regionMatches(true, strLength - suffixLength, suffix, 0, suffixLength))
            return true;

        return false;
    }
403641
boolean requires(final String value) {
        if (requires(myPrefix, value) || requires(myPostfix, value)) {
            return true;
        }

        if (mySuffixes == null) {
            return false;
        }
        for (final Literal suffix : mySuffixes) {
            if (requires(suffix, value)) {
                return true;
            }
        }
        return false;
    }
629685
public boolean endsWith(Bytes suffix) {
    Objects.requireNonNull(suffix, "endsWith(Bytes suffix) cannot have null parameter");
    int startOffset = this.length - suffix.length;

    if (startOffset < 0) {
      return false;
    } else {
      int end = startOffset + this.offset + suffix.length;
      for (int i = startOffset + this.offset, j = suffix.offset; i < end; i++, j++) {
        if (this.data[i] != suffix.data[j]) {
          return false;
        }
      }
    }
    return true;
  }
788258
Rule Literal() {
        return Sequence(
                FirstOf(
                        FloatLiteral(),
                        IntegerLiteral(),
                        CharLiteral(),
                        StringLiteral(),
                        Sequence("true", TestNot(LetterOrDigit())),
                        Sequence("false", TestNot(LetterOrDigit())),
                        Sequence("null", TestNot(LetterOrDigit()))
                ),
                Spacing()
        );
    }
964454
public boolean getBracketedToken(char start, char end, TextProvider textProvider)
    {
        clearLastToken(textProvider);
        clearLeadingSpaces(textProvider);
        mark(textProvider);
        if (m_debug)
			debug("testing " + start + " " + end,textProvider);
        StringBuilder sb = new StringBuilder();
        char c = getNextChar(textProvider);

        if (c != start)
        {
            reset(textProvider);
            return false;
        }
        int brackets = 0;

        while (true)
        {
            if (c == start) brackets++;
            if (c == end) brackets--;
            sb.append(c);
            if (brackets < 1) break;
            c = getNextChar(textProvider);
            if (c == 0)
            {
            	reset(textProvider);
				return false;
            }
        }
        unmark(textProvider);
        String s = sb.toString().trim();
        if (s.length() == 0) return false;
        textProvider.setLastToken(s);
        debug(textProvider);
        return true;
    }
1089653
public static boolean isTrue(Expression expression) {
        if (expression == null) {
            return false;
        }
        if (expression instanceof PropertyExpression
                && classNodeImplementsType(((PropertyExpression) expression).getObjectExpression().getType(), Boolean.class)) {
            if (((PropertyExpression) expression).getProperty() instanceof ConstantExpression
                    && "TRUE".equals(((ConstantExpression) ((PropertyExpression) expression).getProperty()).getValue())) {
                return true;
            }
        }
        return ((expression instanceof ConstantExpression) && ((ConstantExpression) expression).isTrueExpression()) ||
                "Boolean.TRUE".equals(expression.getText());
    }
670892
public boolean checkLastExpressionForDetectionPoint (DetectionPoint triggerDetectionPoint) {
		for (DetectionPoint detectionPoint : getLastExpression().getDetectionPoints()) {
			if (detectionPoint.typeMatches(triggerDetectionPoint)) {
				return true;
			}
		}

		return false;
	}
545449
public static boolean endsWith(final String value, final String search, final int position,
                                   final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        int remainingLength = position - search.length();
        if (caseSensitive) {
            return value.indexOf(search, remainingLength) > -1;
        }
        return value.toLowerCase().indexOf(search.toLowerCase(), remainingLength) > -1;
    }
868453
protected static boolean endsWithSlash(String line) {

        if (!line.endsWith("\\")) {
            return false;
        }
        return ((countPreceding(line, line.length() - 1, '\\') % 2) == 0);
    }
302308
function endsWith(testStr, endsStr) {
        var index = testStr.lastIndexOf(endsStr);
        if (index < 0) {
            return false;
        }
        if (endsStr.length + index == testStr.length) {
            return true;
        }
        return false;
    }
546826
private boolean containsAllowedPrefix(String tpl)
	{
		if (whitePrefixList.isEmpty())
			return true;

		for (String i : whitePrefixList) {
			if (tpl.startsWith(i))
				return true;
		}
		return false;
	}
919930
public boolean hasNext() {
		if(hitLast) {
			return false;
		}
		if(cursor == null) {
			return false;
		}
		if(!gotNext) {
			OperationStatus status;
			// attempt to get the next:
			try {
				if(backward) {
					status = cursor.getPrev(key, value, LockMode.DEFAULT);
				} else {
					status = cursor.getNext(key, value, LockMode.DEFAULT);
				}
				if(status == OperationStatus.SUCCESS) {
					gotNext = true;
				} else {
					close();
				}
			} catch (DatabaseException e) {
				// SLOP: throw a runtime?
				e.printStackTrace();
				close();
			}			
		}
		return gotNext;
	}
360341
private void parseLiteral() {

        AtomicValue atomic;

        if (mToken.getType() == TokenType.VALUE || mToken.getType() == TokenType.POINT) {
            // is numeric literal
            atomic = parseIntegerLiteral();
        } else {
            // is string literal
            assert (mToken.getType() == TokenType.DBL_QUOTE || mToken.getType() == TokenType.SINGLE_QUOTE);
            atomic = parseStringLiteral();
        }

        mPipeBuilder.addLiteral(mRTX, atomic);

    }
655419
public static boolean endsWith(CharSequence s, String end) {
    return (s.length() >= end.length() && s.subSequence(s.length() - end.length(), s.length()).equals(end));
  }
512991
public boolean isMatched(AnalyzedToken token) {
    if (testWhitespace && !isWhitespaceBefore(token)) {
      return false;
    }
    boolean posNegation = posToken != null && posToken.negation;
    if (testString) {
      return isStringTokenMatched(token) ^ negation &&
             isPosTokenMatched(token) ^ posNegation;
    } else {
      return !negation &&
             isPosTokenMatched(token) ^ posNegation;
    }
  }