If one matches returns Match. If all return Error returns error.
Otherwise returns Ok.
@param cc
@return
546118
@Override
    public Status match(int cc)
    {
        int highest = -1;
        Iterator<Matcher> iterator = active.iterator();
        while (iterator.hasNext())
        {
            Matcher matcher = iterator.next();
            Status s = matcher.match(cc);
            highest = Math.max(highest, s.ordinal());
            switch (s)
            {
                case Match:
                    lastMatched = matcher;
                    clear();
                    return s;
                case WillMatch:
                    lastMatched = matcher;
                    return s;
                case Error:
                    iterator.remove();
                    break;
            }
        }
        if (active.isEmpty())
        {
            clear();
            return Status.Error;
        }
        return Status.values()[highest];
    }
770357
@NonNull
    public EmailIntentBuilder cc(@NonNull Collection<String> cc) {
        checkNotNull(cc);
        for (String email : cc) {
            checkEmail(email);
        }
        this.cc.addAll(cc);

        return this;
    }
323867
public boolean matches(Object obj) {
        if (!(obj instanceof Exception))
            return false;

        Exception exception = (Exception) obj;

        return exception.getCause() == null;
    }
392958
@Factory
    public static <T extends Throwable, C extends Throwable> Matcher<T> withCause(final Matcher<C> matcher) {
        return new CustomTypeSafeMatcher<T>(CustomMatchers.fixedDescription("cause ", matcher)) {
            @Override
            protected boolean matchesSafely(T item) {
                return matcher.matches(item.getCause());
            }

            public void describeMismatchSafely(T item, Description mismatchDescription) {
                matcher.describeMismatch(item.getCause(), mismatchDescription);
            }
        };
    }
303659
public static CharMatcher is(final char match) {
    return new FastMatcher() {
      @Override public boolean matches(char c) {
        return c == match;
      }

      @Override public String replaceFrom(CharSequence sequence, char replacement) {
        return sequence.toString().replace(match, replacement);
      }

      @Override public CharMatcher and(CharMatcher other) {
        return other.matches(match) ? this : NONE;
      }

      @Override public CharMatcher or(CharMatcher other) {
        return other.matches(match) ? other : super.or(other);
      }

      @Override public CharMatcher negate() {
        return isNot(match);
      }

      @Override public String toString() {
        return "CharMatcher.is('" + showCharacter(match) + "')";
      }
    };
  }
636370
private boolean matchRuleExceptions(RuleException[] exceptions, CAS aCAS, AnnotationFS annot) {

   // if we have already checked the exceptions for the current match type
   // annotation, return the
   // last result - this can happen in case of MATCH_ALL match strategy
   if (this.lastRuleExceptionAnnotation == annot) {
     return this.lastRuleExceptionMatch;
   }

   // loop over all rule exceptions
   for (int i = 0; i < exceptions.length; i++) {

     // store current match type annotation for performance reason. In case
     // of MATCH_ALL match
     // strategy maybe the matchRuleException() method is called multiple
     // times for the same
     // match type annotations and in that case the result of the rule
     // exception match is exactly
     // the same.
     this.lastRuleExceptionAnnotation = annot;

     // find covering annotation
     AnnotationFS coverFs = findCoverFS(aCAS, annot, exceptions[i].getType());
     // check if covering annotation was found
     if (coverFs != null) {
       // check if the found coverFs annotation match the exception pattern
       if (exceptions[i].matchPattern(coverFs)) {
         this.lastRuleExceptionMatch = true;
         return this.lastRuleExceptionMatch;
       }
     }
   }

   this.lastRuleExceptionMatch = false;
   return false;
 }
1089049
public boolean matches(String cn) {
        if (includePattern == null)
            return true;

        if (includePattern != null)
            return includePattern.matcher(cn).matches();

        return false;
    }
307695
public static boolean isMatch(String match, Object paramObj) {
        return StringHelper.isBlank(match) || isTrue(match, paramObj);
    }
402559
public boolean matches(Object obj) {
        if (!(obj instanceof Exception))
            return false;

        Exception exception = (Exception) obj;

        String foundMessage = exception.getMessage();

        return expectedMessageMatcher.matches(foundMessage);
    }
223738
@Override
    public final boolean containsAll(Collection<?> c) {
        // Short circuit with size comparison first
        final int size = this.size();
        if (size == 0 || size < c.size()) {
            return false;
        }

        for (final Object o : c) {
            @SuppressWarnings("unchecked")
            final K key = this.getElementKey((T) o);
            final Queue<T> queue = this.keyedQueues.get(key);
            if (queue == null || !queue.contains(o)) {
                return false;
            }
        }

        return true;
    }
157152
protected Match<?> match() {
        Match<?> m = result().getMatch();
        if (m == null) {
            throw new IllegalStateException("Match failed");
        }
        return m;
    }
541936
public boolean isFilterMatch(BaseMessageHeader messageHeader)
    {
        boolean bMatch = true;
        if (messageHeader != null)
        {
            if (this.getQueueName() != null)
                if (!this.getQueueName().equals(messageHeader.getQueueName()))
                    return false;   // No match
            if (this.getQueueType() != null)
                if (!this.getQueueType().equals(messageHeader.getQueueType()))
                    return false;   // No match
            if (this.getMessageSource() != null)
                if (this.getMessageSource() == messageHeader.getMessageSource())
                    return false;   // If the source codes are the same object, don't echo!
            Object[][] mxMessageHeader = messageHeader.getNameValueTree();
            Object[][] mxMessageFilter = this.getNameValueTree();
            bMatch = this.compareTrees(mxMessageHeader, mxMessageFilter, false);
            if (bMatch)
                if (messageHeader.getRegistryIDMatch() != null)
                    if (!messageHeader.getRegistryIDMatch().equals(this.getRegistryID()))
                        bMatch = false;
        }
        return bMatch;    // MATCH!!!
    }
976316
private static ContentMatcher createMatcher(
    SimpleTest test,
    ContentMatcher oldMatcher)
  {
    if (tc.isEntryEnabled())
      tc.entry(
        cclass,
        "createMatcher",
        "test: " + test + ", oldmatcher: " + oldMatcher);
    Identifier id = test.getIdentifier();
    boolean isExtended = (test instanceof ExtendedSimpleTestImpl);
    ContentMatcher ans;
    switch (id.getType())
    {
      case Selector.BOOLEAN :
        if(!isExtended)
        {
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New BooleanMatcher for id " + id.getName());
          ans = new BooleanMatcher(id);
        }
        else
        {
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New SetValBooleanMatcher for id " + id.getName());
          ans = new SetValBooleanMatcher(id);          
        }
        break;
      case Selector.UNKNOWN :
      case Selector.OBJECT :
        if (tc.isDebugEnabled())
          tc.debug(
            cclass,
            "createMatcher",
            "New EqualityMatcher for id " + id.getName());
        ans = new EqualityMatcher(id);
        break;
      case Selector.STRING :
      case Selector.TOPIC :
        if(!isExtended)
        {        
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New StringMatcher for id " + id.getName());
          ans = new StringMatcher(id);
        }
        else
        {
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New SetValStringMatcher for id " + id.getName());
          ans = new SetValStringMatcher(id);          
        }          
        break;
      case Selector.CHILD :
        if (tc.isDebugEnabled())
          tc.debug(
            cclass,
            "createMatcher",
            "New ExtensionMatcher for id " + id.getName());
        ans = new SetValChildAccessMatcher(id);
        break;        
      default :
        if(!isExtended)
        {             
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New NumericMatcher for id " + id.getName());
          ans = new NumericMatcher(id);
        }
        else
        {
          if (tc.isDebugEnabled())
            tc.debug(
              cclass,
              "createMatcher",
              "New SetValNumericMatcher for id " + id.getName());
          ans = new SetValNumericMatcher(id);          
        }
    }
    
    ans.vacantChild = oldMatcher;

    if (tc.isEntryEnabled())
      tc.exit(cclass, "createMatcher");
    return ans;
  }
519031
@Override
  public Description matchClass(ClassTree tree, VisitorState state) {
    if (hasDirectAnnotationWithSimpleName(ASTHelpers.getSymbol(tree), CHECK_RETURN_VALUE)
        && hasDirectAnnotationWithSimpleName(ASTHelpers.getSymbol(tree), CAN_IGNORE_RETURN_VALUE)) {
      return buildDescription(tree).setMessage(String.format(BOTH_ERROR, "class")).build();
    }
    return Description.NO_MATCH;
  }
866369
public boolean matches(String string) {		
		Matcher matcher = pattern.matcher(string);
		boolean result = matcher.matches();
		return result;		
	}
1294836
public boolean isMatch(InputReader reader) throws IOException
    {
        int rc = match(reader);
        return (rc == 1 && reader.read() == -1);
    }
755347
@SafeVarargs
	public static <T extends RValue> T checkType(RValue operand, SyntacticItem context, Class<T>... types) {
		// Got through each type in turn checking for a match
		for (int i = 0; i != types.length; ++i) {
			if (types[i].isInstance(operand)) {
				// Matched!
				return (T) operand;
			}
		}
		// No match, therefore through an error
		if (operand == null) {
			error("null operand", context);
		} else {
			error("operand returned " + operand.getClass().getName() + ", expecting one of " + Arrays.toString(types),
					context);
		}
		return null;
	}