Tells if the token looks like a long option.

@param token
516898
private boolean isLongOption(String token)
    {
        if (!token.startsWith("-") || token.length() == 1)
        {
            return false;
        }

        int pos = token.indexOf("=");
        String t = pos == -1 ? token : token.substring(0, pos);

        if (!options.getMatchingOptions(t).isEmpty())
        {
            // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V)
            return true;
        }
        else if (getLongPrefix(token) != null && !token.startsWith("--"))
        {
            // -LV
            return true;
        }

        return false;
    }
1071211
public void visitToken(Token token) {
    for (Trivia trivia : token.getTrivia()) {
      if (!trivia.isComment()) {
        continue;
      }
      Token triviaToken = trivia.getToken();
      String comment = triviaToken.getOriginalValue();
      int line = triviaToken.getLine();
      if (indexOfIgnoreCase(comment) != -1) {
        String[] lines = EOL_PATTERN.split(comment);

        for (int i = 0; i < lines.length; i++) {
          int start = indexOfIgnoreCase(lines[i]);
          if (start != -1 && !isLetterAround(lines[i], start)) {
            check.getContext().createLineViolation(check, message, line + i);
          }
        }
      }
    }
  }
212569
public static boolean isSignedLong(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        try {
            Long.parseLong(s);

            return true;
        } catch (Exception e) {
            return false;
        }
    }
770543
private void handleToken(String token) throws OptionParserException {
        currentToken = token;
        if (!"--".equals(token)) {
            if (currentOption != null && currentOption.acceptsValue() &&
                    !currentOption.isWithEqualSign() && isArgument(token)) {
                String t = OptionUtils.stripLeadingAndTrailingQuotes(token);
                currentOption.addValue(t);
            } else if (token.startsWith("--")) {
                String t = OptionUtils.stripLeadingHyphens(token);
                handleLongOption(t);
            } else if (token.startsWith("-") && token.length() > 1) {
                String t = OptionUtils.stripLeadingHyphens(token);
                handleShortAndLongOption(t);
            } else {
                handleUnknownToken(token);
            }
        }
        if (currentOption != null && !currentOption.acceptsValue()) {
            currentOption = null;
        }
    }
93081
public static boolean isValidKillSessionsToken(String token) {
    if (token == null || token.isEmpty()) {
      return false;
    }
    
    for (String validToken:VALID_TOKENS) {
      if (token.equals (validToken)) {
        return true;
      }
    }
    
    return false;
  }
341388
final boolean tokenIs(String s)
  {
    return (m_token != null) ? (m_token.equals(s)) : (s == null);
  }
341947
private boolean isWord(String token) {
    boolean isWord = true;
    if (StringUtils.isNumericSpace(token)) {
      isWord = false;
    } else if (token.length() == 1) {
      char c = token.charAt(0);
      if (!Character.isLetter(c)) {
        isWord = false;
      }
    }
    return isWord;
  }
258630
public boolean skip(ParserToken token) {
      if (token == null) {
         return false;
      }
      if (isPrefix(token)) {
         if (prefixHandlers.containsKey(token.getType())) {
            return prefixHandlers.get(token.getType()) instanceof PrefixSkipHandler;
         } else {
            return prefixSkipHandler != null;
         }
      }
      return false;
   }
1029745
private static Token styleToken(final Token token, final String[] options) {
		Token styledToken = token;

		for (String option : options) {
			int splitIndex = option.indexOf('=');
			if (splitIndex == -1) {
				InternalLogger.log(Level.ERROR, "No value set for '" + option.trim() + "'");
			} else {
				String key = option.substring(0, splitIndex).trim();
				String value = option.substring(splitIndex + 1).trim();

				int number;
				try {
					number = parsePositiveInteger(value);
				} catch (NumberFormatException ex) {
					InternalLogger.log(Level.ERROR, "'" + value + "' is an invalid value for '" + key + "'");
					continue;
				}

				if ("min-size".equals(key)) {
					styledToken = new MinimumSizeToken(styledToken, number);
				} else if ("indent".equals(key)) {
					styledToken = new IndentationToken(styledToken, number);
				} else {
					InternalLogger.log(Level.ERROR, "Unknown style option: '" + key + "'");
				}
			}
		}

		return styledToken;
	}
715624
public VLongToken visitVLong(EditsElement e) throws IOException {
    return (VLongToken)visit(tokenizer.read(new VLongToken(e)));
  }
96962
function isLastTokenInCurrentLine(token) {
            const tokenAfter = sourceCode.getTokenAfter(token);

            return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter));
        }
183558
private void handleLongOptionWithoutEqual(String token) throws ParseException
    {
        List<String> matchingOpts = options.getMatchingOptions(token);
        if (matchingOpts.isEmpty())
        {
            handleUnknownToken(currentToken);
        }
        else if (matchingOpts.size() > 1)
        {
            throw new AmbiguousOptionException(token, matchingOpts);
        }
        else
        {
            handleOption(options.getOption(matchingOpts.get(0)));
        }
    }
1025388
private static boolean isSeparatorToken(final char possibleSeparatorChar) {
        for (final SeparatorToken token : SeparatorToken.values()) {
            if (token.value == possibleSeparatorChar) {
                return true;
            }
        }
        return false;
    }
47085
public LongToken visitLong(EditsElement e) throws IOException {
    return (LongToken)visit(tokenizer.read(new LongToken(e)));
  }
550651
private void handleLongOption(String token) throws ParseException
    {
        if (token.indexOf('=') == -1)
        {
            handleLongOptionWithoutEqual(token);
        }
        else
        {
            handleLongOptionWithEqual(token);
        }
    }
238946
private static boolean expect(StringTokenizer tokenizer, String token) {
        if (!tokenizer.hasMoreTokens()) {
            return false;
        }
        String s = tokenizer.nextToken();
        if (DEBUG) {
            System.out.println("token=" + s);
        }
        return s.equals(token);
    }
560410
final public Boolean checkPositionType(String type) {
    if (tokenPosition == null) {
      return false;
    } else {
      return tokenPosition.checkType(type);
    }
  }