Return true if the specified symbol represents an alignment match.

@param symbol symbol
@return true if the specified symbol represents an alignment match
358274
static boolean isMatchSymbol(final Symbol symbol) {
        if (!(symbol instanceof BasisSymbol)) {
            return false;
        }
        BasisSymbol basisSymbol = (BasisSymbol) symbol;
        Set<Symbol> uniqueSymbols = new HashSet<Symbol>();
        for (Object o : basisSymbol.getSymbols()) {
            Symbol s = (Symbol) o;
            if (isGapSymbol(s)) {
                return false;
            }
            uniqueSymbols.add((Symbol) o);
        }
        return (uniqueSymbols.size() == 1);
    }
903532
public static boolean isValidRandomIdentifier( String identifier ) {
        if (identifier.length() == UUID_LENGTH) {
            // It's the right length, but see if it's a UUID ...
            try {
                UUID.fromString(identifier);
                return true;
            } catch (IllegalArgumentException e) {
                // Nope
                return false;
            }
        }
        return false;
    }
1189574
public boolean matches(final MediaType type) {
        final String star = "*";
        return (this.high.equals(star)
            || type.high.equals(star)
            || this.high.equals(type.high))
            && (this.low.equals(star)
            || type.low.equals(star)
            || this.low.equals(type.low));
    }
862639
public boolean containsSymbol(String symbol) {

        // search for identical symbol
        int bucket = hash(symbol) % fTableSize;
        int length = symbol.length();
        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
            if (length == entry.characters.length) {
                for (int i = 0; i < length; i++) {
                    if (symbol.charAt(i) != entry.characters[i]) {
                        continue OUTER;
                    }
                }
                return true;
            }
        }

        return false;

    }
870554
private boolean isMathExpression(String line) {
        String cleanLine = cleanLine(line).trim();
        boolean mathExpression = false;
        if (cleanLine.startsWith(DEFINE)) {
            return true;
        } else if (cleanLine.matches(CODE_LINE_SUFFIX)) {
            return true;
        }

        // go forward
        int index = cleanLine.indexOf(COPYRIGHT_SYMBOL);
        for (int i = index + 1; i < cleanLine.length(); i++) {
            char c = cleanLine.charAt(i);
            if (c == Constants.OPEN_BRACKET || c == Constants.CLOSE_BRACKET || c == Constants.WHITESPACE_CHAR) {
                continue;
            } else if (MATH_SYMBOLS.contains(c)) {
                mathExpression = true;
                break;
            } else {
                break;
            }
        }

        // go backwards
        if (mathExpression) {
            for (int i = index - 1; i >= 0; i--) {
                char c = cleanLine.charAt(i);
                if (c == Constants.OPEN_BRACKET || c == Constants.CLOSE_BRACKET || c == Constants.WHITESPACE_CHAR) {
                    continue;
                } else if (MATH_SYMBOLS.contains(c)) {
                    mathExpression = true;
                    break;
                } else {
                    break;
                }
            }
        }
        return mathExpression;
    }
706786
protected boolean verifyPatternMatch(String text) {
		if (this.expectedPattern == null) {
			return false;
		}
		return this.expectedPattern.matcher(text).matches();
	}
731133
@Override
    public boolean matches(IAtom atom) {
        if (!atom.getSymbol().equals("H")) {
            return false;
        }

        if (atom.getFormalCharge() == 1) { // proton matches
            return true;
        }

        // hydrogens connected to other hydrogens, e.g., molecular hydrogen
        List<IAtom> list = invariants(atom).target().getConnectedAtomsList(atom);
        for (IAtom connAtom : list) {
            if (connAtom.getSymbol().equals("H")) {
                return true;
            }
        }

        // hydrogens connected to other than one other atom, e.g., bridging hydrogens
        if (invariants(atom).degree() > 1) {
            return true;
        }

        //isotopic hydrogen specifications, e.g. deuterium [2H] or tritium etc
        if (atom.getMassNumber() != null) {
            if (getMassNumber().intValue() == atom.getMassNumber().intValue()) return true;
        } else {
            // target atom is [H], so make sure query atom has mass number = 1
            if (getMassNumber() == 1) return true;
        }

        return false;
    }
104957
public static boolean matches(Pattern patternMatcher, Object... elements)
    {
        if (patternMatcher == null) {
            return true;
        }

        for (Object element : elements) {
            if (matches(patternMatcher, element)) {
                return true;
            }
        }

        return false;
    }
864438
public void putSymbol(Symbol symbol) {
        if (symbol.getName() == null)
            throw new IllegalArgumentException("null symbol name");
        ensureSymbolTable();
        symbolTable.put(symbol.getName(), symbol);
        symbol.setContainingTable(this);
        top.addSymbol(symbol);
    }
321131
function isParameterAssigned(symbol) {
            var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
            var links = getNodeLinks(func);
            if (!(links.flags & 4194304 /* AssignmentsMarked */)) {
                links.flags |= 4194304 /* AssignmentsMarked */;
                if (!hasParentWithAssignmentsMarked(func)) {
                    markParameterAssignments(func);
                }
            }
            return symbol.isAssigned || false;
        }
109430
def _check_symbols(self, symbols):
        """"""
        if len(symbols) != self.size:
            raise TypeError("The number of symbols in the graph does not "
                "match the length of the atomic numbers array.")
        for symbol in symbols:
            if not isinstance(symbol, str):
                raise TypeError("All symbols must be strings.")
623753
@Override
    public boolean matches(IAtomContainer targetContainer, IBond targetBond) {
        if (this.smartQueryBond != null && queryBond == null) {
            return smartQueryBond.matches(targetBond);
        } else {
            if (!isBondMatchFlag()) {
                return true;
            }
            if (isBondMatchFlag() && isBondTypeMatch(targetBond)) {
                return true;
            }
            if (isBondMatchFlag() && this.unsaturation == getUnsaturation(targetContainer, targetBond)) {
                return true;
            }
        }
        return false;
    }
953032
public static boolean isOperand(final String s) {
    String symbol = s.toLowerCase(Locale.ENGLISH);
    return (!operators.contains(symbol));
  }
164041
def _symbol_in(self, symbol, name):
        """"""
        lsymbol = symbol.lower()
        lname = name.lower()
        return lsymbol == lname[:len(symbol)] or "_" + lsymbol in lname
465785
def check_trademark_symbol(text):
    """"""
    err = "typography.symbols.trademark"
    msg = u"(TM) is a goofy alphabetic approximation, use the symbol ™."
    regex = "\(TM\)"

    return existence_check(
        text, [regex], err, msg, max_errors=3, require_padding=False)
424830
public boolean matches(final Node node) throws IllegalArgumentException {
        // Precondition checks
        if (node == null) {
            throw new IllegalArgumentException("node must be specified");
        }

        if (!name.equals(node.getName())) {
            return false;
        }

        if ((text != null && node.getText() == null) || (text != null && !text.trim().equals(node.getText().trim()))) {
            return false;
        }

        if (attributes != null) {
            for (final Map.Entry<String, String> attribute : attributes.entrySet()) {
                final String attrValue = attribute.getValue();
                final String attrName = attribute.getKey();

                if (!attrValue.equals(node.getAttribute(attrName))) {
                    return false;
                }
            }
        }

        return true;
    }
1009753
static boolean isSymbolChar(int ch) {
        int t = Character.getType(ch);
        return t == Character.MATH_SYMBOL || t == Character.CURRENCY_SYMBOL || t == Character.MODIFIER_SYMBOL || t == Character.OTHER_SYMBOL;
    }