Returns true if this pattern is applicable to the given set of variables.
972967
private boolean isApplicable( Iterator<IVarDef> varDefs)
    {
    boolean applicable = false;
    while( varDefs.hasNext() && !(applicable = isApplicable( varDefs.next())));
    return applicable;
    }
1120505
public static boolean isVariable(String s) {
        if (s == null ||
                s.length() < 3 ||
                !s.startsWith("$") ||
                !Character.isLetter(s.charAt(1))) {
            return false;
        }

        // check that the rest of the string is comprised of letters and digits only:
        for (int i = 2; i < s.length(); i++) {
            char c = s.charAt(i);
            if (!Character.isLetterOrDigit(c)) {
                return false;
            }
        }

        return true;
    }
609516
public static boolean isVariableSet(QuerySolution resultRow, String variableName) {

        if (resultRow != null) {
            return resultRow.contains(variableName);
        }

        return false;
    }
1346395
public static final boolean isListItem(String pattern)
    {
        int idx = pattern.lastIndexOf(Lim);
        if (idx != -1)
        {
            try
            {
                Integer.parseInt(pattern.substring(idx+1));
                return true;
            }
            catch (NumberFormatException ex)
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
1282390
protected static boolean matchesOne(String str, Pattern... patterns) {
        for (Pattern pattern : patterns) {
            if (pattern.matcher(str).matches()) {
                return true;
            }
        }
        return false;
    }
132003
boolean partialIsVariable(MultistepExprHolder testee, int lengthToTest)
  {
  	if(1 == lengthToTest)
  	{
  		WalkingIterator wi = (WalkingIterator)testee.m_exprOwner.getExpression();
  		if(wi.getFirstWalker() instanceof FilterExprWalker)
  			return true;
  	}
  	return false;
  }
1238776
public boolean hasInputVariable(String name) {
        for (InputVariable inputVariable : this.inputVariables) {
            if (inputVariable.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
857235
private boolean checkPattern(Mtp2Buffer frame, int sltmLen, byte[] pattern) {
        if (sltmLen != pattern.length) {
            return false;
        }
        for (int i = 0; i < pattern.length; i++) {
            if (frame.frame[i + PATTERN_OFFSET] != pattern[i]) {
                return false;
            }
        }
        return true;
    }
1240799
private static boolean doesNameMatchPattern(final Principal principal, final Pattern pattern) {
        if (pattern != null) {
            val name = principal.getName();
            val result = pattern.matcher(name).matches();
            LOGGER.debug("[{}] matches [{}] == [{}]", pattern.pattern(), name, result);
            return result;
        }
        return true;
    }
1168107
private static boolean matchesPatternList(final String str, final List<Pattern> patterns) {
        if (patterns != null) {
            for (final Pattern pattern : patterns) {
                if (pattern.matcher(str).matches()) {
                    return true;
                }
            }
        }
        return false;
    }
1239213
public static boolean matches(String[] patterns, String value) {
        for (int i = 0; i < patterns.length; i++) {
            String pattern = patterns[i];
            if (pattern.equals(value)) {
                return true;
            }
            if (pattern.endsWith("*")) {
                if (value.startsWith(pattern.substring(0, pattern.length() - 1))) {
                    return true;
                }
            }
            if (pattern.startsWith("*")) {
                if (value.endsWith(pattern.substring(1))) {
                    return true;
                }
            }
        }
        return false;
    }
799830
public boolean checkSuffixes(String uri, String[] patterns) {
		for (String pattern : patterns) {
			if (pattern.length() > 0) {
				if (uri.endsWith(pattern)) {
					return true;
				}
			}
		}
		return false;
	}
1369491
public static boolean matches(Collection<PathPattern> patterns, List<String> path) {
		for (PathPattern pattern : patterns)
			if (pattern.matches(path))
				return true;
		return false;
	}
822748
def visit_Set(self, pattern):
        
        if len(pattern.elts) > MAX_UNORDERED_LENGTH:
            raise DamnTooLongPattern("Pattern for Set is too long")
        return (isinstance(self.node, Set) and
                any(self.check_list(self.node.elts, pattern_elts)
                    for pattern_elts in permutations(pattern.elts)))
598687
function isRelayVariables(variables: mixed): boolean {
  return (
    typeof variables === 'object' &&
    variables !== null &&
    !Array.isArray(variables)
  );
}
1250882
public static boolean isVariable(ASTNode expression, String pattern) {
        return (expression instanceof VariableExpression && ((VariableExpression) expression).getName().matches(pattern));
    }
660694
private boolean isIncluded( VarNamePattern varNamePath)
    {
    // If no included patterns specified, include all variables.
    boolean included = getIncludedVars().isEmpty();
    if( !included)
      {
      // Otherwise, look for a matching pattern.
      Iterator<VarNamePattern> includedVars = getIncludedVars().iterator();
      while( includedVars.hasNext() && !(included = includedVars.next().matches( varNamePath)));
      }
    
    return included;
    }