Matches a case class of one element.

<p>If matched, the {@code a} value is decomposed to 0.
494940
public static <T extends Case1<A>, A, EA extends A> DecomposableMatchBuilder0<T> case1(
      Class<T> clazz, DecomposableMatchBuilder0<EA> a) {
    List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any());
    return new DecomposableMatchBuilder1<T, EA>(matchers, 0, new Case1FieldExtractor<>(clazz))
        .decomposeFirst(a);
  }
436245
public final boolean containsIgnoreCase(String s)
  {

    if (null == s)
      return false;

    for (int i = 0; i < m_firstFree; i++)
    {
      if (m_map[i].equalsIgnoreCase(s))
        return true;
    }

    return false;
  }
370638
public static <T extends Case2<A, B>, A, B> DecomposableMatchBuilder2<T, A, B> case2(
      Class<T> clazz, MatchesAny<A> a, MatchesAny<B> b) {
    List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any(), ArgumentMatchers.any());
    return new DecomposableMatchBuilder2<T, A, B>(
        matchers, Tuple2.of(0, 1), new Case2FieldExtractor<>(clazz));
  }
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];
    }
1245918
public static boolean isMatched(Map<String, Object> patterns,
                                    String className) {
        // Array [] object class names are "[x", where x is the first letter of the array type
        // -> NO '.' in class name, thus!
        // see http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getName%28%29
        String qualifiedNamespace = className;
        String name = className;
        if( className.indexOf('.') > 0 ) { 
            qualifiedNamespace = className.substring( 0, className.lastIndexOf( '.' ) ).trim();
            name = className.substring( className.lastIndexOf( '.' ) + 1 ).trim();
        }
        else if( className.indexOf('[') == 0 ) { 
           qualifiedNamespace = className.substring(0, className.lastIndexOf('[') );
        }
        Object object = patterns.get( qualifiedNamespace );
        if ( object == null ) {
            return true;
        } else if ( STAR.equals( object ) ) {
            return false;
        } else if ( patterns.containsKey( "*" ) ) {
            // for now we assume if the name space is * then we have a catchall *.* pattern
            return true;
        } else {
            List list = (List) object;
            return !list.contains( name );
        }
    }
203139
def Match(*pattern)
      result = ::PatternMatching::CaseEqualityReversal.new(*pattern)
      (self.class)::B._clear_bindings!(caller_locations(1,1)[0].label) unless result
      result
    end
693656
public static DecomposableMatchBuilder1<Short, Short> caseShort(MatchesAny s) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(Short.class));
  }
811955
protected EofMatch findEof(Match matches[]) {
        EofMatch ourEof = null;
        for (int i = 0; i < matches.length; i++) {
            if (matches[i] instanceof EofMatch)
                ourEof = (EofMatch) matches[i];
        }

        if (ourEof == null) {
            // Have to create our own
            ourEof = new EofMatch();
        }

        return ourEof;
    }
419357
public static <T> Case<T> matchCase(Supplier<Boolean> condition ,
                                      Supplier<Result<T>> value) {
    return new Case<>(condition , value);
  }
470686
public <U extends T> OngoingMatchingR0<T, U, R> when(
      DecomposableMatchBuilder0<U> decomposableMatchBuilder) {
    return new OngoingMatchingR0<>(this, decomposableMatchBuilder.build());
  }
467614
public static DecomposableMatchBuilder1<Byte, Byte> caseByte(MatchesAny b) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(matchers, 0, new PrimitiveFieldExtractor<>(Byte.class));
  }
146934
@Override
	public boolean satisfies(Match match, int... ind)
	{
		assert ind.length == 2;

		return (match.get(ind[0]) == match.get(ind[1])) == equals;
	}
790956
public <U extends T> InitialMatching0<T, U> when(
      DecomposableMatchBuilder0<U> decomposableMatchBuilder) {
    return new InitialMatching0<>(decomposableMatchBuilder.build(), value);
  }
1332178
private static boolean isMatch(List<ValueMatcher> matchers, int index, int value) {
		return (matchers.size() > index) ? matchers.get(index).match(value) : true;
	}
1210040
@Override
	public boolean satisfies(Match match, int... ind)
	{
		Collection<BioPAXElement> set = con.generate(match, ind);
		
		switch (type)
		{
			case EQUAL: return set.size() == size;
			case GREATER: return set.size() > size;
			case GREATER_OR_EQUAL: return set.size() >= size;
			case LESS: return set.size() < size;
			case LESS_OR_EQUAL: return set.size() <= size;
			default: throw new RuntimeException(
				"Should not reach here. Did somebody modify Type enum?");
		}
	}
1342959
public static <T> DecomposableMatchBuilder1<T, T> caseThat(org.hamcrest.Matcher<T> matcher) {
    @SuppressWarnings("unchecked")
    List<Matcher<Object>> matchers = Lists.of((Matcher<Object>) HamcrestMatcher.of(matcher));

    return new DecomposableMatchBuilder1<>(matchers, 0, new IdentityFieldExtractor<>());
  }
767865
public static boolean matches(String pattern, String value) {
        Pattern p = Pattern.compile(pattern);
        Matcher m = p.matcher(value);
        return m.matches();
    }