A {@link CharPredicate} that returns true if {@code predicate} evaluates to false.
429295
public static CharPredicate not(final CharPredicate predicate) {
    return new CharPredicate() {
      @Override public boolean isChar(char c) {
        return !predicate.isChar(c);
      }
      @Override public String toString() {
        return "^" + predicate;
      }
    };
  }
1361412
boolean checkPrefix(char[] chars, int[] cursor) {
    if (chars.length > cursor[0] && chars[cursor[0]] == MatchSpace.NONWILD_MARKER)
      return false;
    if (prefix == null)
      return true;
    if (cursor[1] - cursor[0] < prefix.minlen)
      // a conservative test, but if we can't pass it, we'll certainly fail later
      return false;
    for (int i = 0; i < prefix.items.length; i++) {
      Object item = prefix.items[i];
      if (item == Pattern.matchOne)
        if (!topicSkipForward(chars, cursor))
          return false;
        else
          ; // topic skip succeeded so continue
      else if (!matchForward(chars, (char[]) item, cursor))
        return false;
      // else this phase succeeded so continue
    }
    // The prefix matches exactly.  But, unless we are at the end of the string,
    // the next character MUST be a separator.
    return cursor[0] == cursor[1] || 
      chars[cursor[0]] == MatchSpace.SUBTOPIC_SEPARATOR_CHAR;
  }
598501
public final boolean contains(CharSequence s) {

        int cp = getSingleCP(s);
        if (cp < 0) {
            return strings.contains(s.toString());
        } else {
            return contains(cp);
        }
    }
947809
public boolean any(TextProvider textProvider)        
    {
        clearLastToken(textProvider);
        clearLeadingSpaces(textProvider);
        mark(textProvider);
        if (m_debug)
			debug("testing",textProvider);
        StringBuilder sb = new StringBuilder();
        while (true)
        {
            char c = getNextChar(textProvider);

            if (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == 0)
            {
            	break;
            }
            sb.append(c);
        }
        unmark(textProvider);
        String s = sb.toString().trim();
        if (s.length() == 0) return false;
        textProvider.setLastToken(s);
        debug(textProvider);
        return true;
    }
209148
public static boolean isJavaIdentifier( String str ) {
      if( str.length() == 0 || !Character.isJavaIdentifierStart( str.charAt( 0 ) ) ){
         return false;
      }
      for( int i = 1; i < str.length(); i++ ){
         if( !Character.isJavaIdentifierPart( str.charAt( i ) ) ){
            return false;
         }
      }
      return true;
   }
1311882
public static Character detectCharIfNone(String string, CharPredicate predicate, String resultIfNone)
    {
        Character result = StringIterate.detectChar(string, predicate);
        return result == null ? Character.valueOf(resultIfNone.charAt(0)) : result;
    }
1129543
@Deprecated
    public static String select(String string, CharPredicate predicate)
    {
        return StringIterate.selectChar(string, predicate);
    }
853776
@Override
	public boolean containsValidPrefix(final String key) {
		if (key != null) {
			lock.readLock().lock();
			try {
				for (final String aPrefix : prefixes) {
					if (key.equals(aPrefix) || key.startsWith(aPrefix + getPrefixDelimiter())) {
						return true;
					}
				}
			} finally {
				lock.readLock().unlock();
			}
		}
		return false;
	}
719918
@Deprecated
    public static boolean allSatisfy(String string, CodePointPredicate predicate)
    {
        return StringIterate.allSatisfyCodePoint(string, predicate);
    }
919528
public static CharPredicate or(final CharPredicate... predicates) {
    if (predicates.length == 0)
      return NEVER;
    else if (predicates.length == 1) return predicates[0];
    return new CharPredicate() {
      @Override public boolean isChar(char c) {
        for(int i = 0;i < predicates.length;i++) {
          if (predicates[i].isChar(c)) return true;
        }
        return false;
      }
      @Override public String toString() {
        return Strings.join(" or ", predicates);
      }
    };
  }
593699
private boolean find(Clause clause, char[] chars, int[] cursor) {
    int start = cursor[0];
    int end = cursor[1];
    while (end - start >= clause.minlen)
      if (matchClause(clause, chars, cursor))
        return true;
      else
        cursor[0] = ++start;
    return false;
  }
454652
private static boolean isValidChar(char c) {
        if ( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' ) {
            return true;
        }
        return c != ' ' && c != '\u00A0' && !Character.isWhitespace(c) && !Character.isWhitespace(c);
    }
220452
public static Pattern isChar(final CharPredicate predicate) {
    return new Pattern() {
      @Override public int match(CharSequence src, int begin, int end) {
        if (begin >= end)
          return MISMATCH;
        else if (predicate.isChar(src.charAt(begin)))
          return 1;
        else
          return MISMATCH;
      }

      @Override public String toString() {
        return predicate.toString();
      }
    };
  }
1051227
private boolean checkStringToBeParsed(final String pStringToBeParsed) {

    // Check for nullness
    if (pStringToBeParsed == null) {
      if (mDebugging) {
        out.println(DebugUtil.getPrefixDebugMessage(this) + "string to be parsed is null - rejection!");
      }
      return false;
    }

    // Check if valid character (element in alphabet)
    for (int i = 0; i < pStringToBeParsed.length(); i++) {
      if (!isInAlphabet(pStringToBeParsed.charAt(i))) {
        if (mDebugging) {
          out.println(DebugUtil.getPrefixDebugMessage(this)
                      + "one or more characters in string to be parsed are not legal characters - rejection!");
        }
        return false;
      }
    }
    return true;
  }
922487
@Deprecated
    public static boolean anySatisfy(String string, CodePointPredicate predicate)
    {
        return StringIterate.anySatisfyCodePoint(string, predicate);
    }
692843
public static boolean isJavaLangType(String s) {
		return getJavaDefaultTypes().contains(s) && Character.isUpperCase(s.charAt(0));
	}
1088514
public static Predicate<String> contains(final String value) {
		return new Predicate<String>() {
			@Override
			public boolean apply(final String input) {
				return input.contains(value);
			}
		};
	}