Matches a case class of one element.

<p>If matched, the {@code a} value is extracted.
965576
public static <T extends Case1<A>, A> DecomposableMatchBuilder1<T, A> case1(
      Class<T> clazz, MatchesAny<A> a) {
    List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any());
    return new DecomposableMatchBuilder1<T, A>(matchers, 0, new Case1FieldExtractor<>(clazz));
  }
1116139
public static Condition exactTextCaseSensitive(final String text) {
    return new Condition("exact text case sensitive") {
      @Override
      public boolean apply(Driver driver, WebElement element) {
        return Html.text.equalsCaseSensitive(element.getText(), text);
      }

      @Override
      public String toString() {
        return name + " '" + text + '\'';
      }
    };
  }
1232715
public boolean isMatched(String value)
    {
        if (value == null)
            return false;
        if ((_match != null)) {
            for (int i = 0; i < _match.length; i++) {
                if (value.equals(_match[i]))
                    return true;
            }
        }
        else {
            if (_defaultSelections != null) {
                return (_defaultSelections.contains(value));
            }
        }

        return false;

    }
1095545
static Matcher ignoreCase(Matcher matcher) {
    if (matcher instanceof CharClassMatcher) {
      CharClassMatcher m = matcher.as();
      return new CharClassMatcher(m.set(), true);
    } else if (matcher instanceof CharSeqMatcher) {
      CharSeqMatcher m = matcher.as();
      return new CharSeqMatcher(m.pattern(), true);
    } else if (matcher instanceof IndexOfMatcher) {
      IndexOfMatcher m = matcher.as();
      return new IndexOfMatcher(m.pattern(), m.next(), true);
    } else if (matcher instanceof StartsWithMatcher) {
      StartsWithMatcher m = matcher.as();
      return new StartsWithMatcher(m.pattern(), true);
    } else {
      return matcher;
    }
  }
1109970
protected boolean evaluate(String value) {
        if (ValidationMatcherUtils.isValidationMatcherExpression(matchingValue)) {
            try {
                ValidationMatcherUtils.resolveValidationMatcher(selectKey, value, matchingValue, context);
                return true;
            } catch (ValidationException e) {
                return false;
            }
        } else {
            return value.equals(matchingValue);
        }
    }
590670
@Override
    public MatchType match(int level, Node node) {
        if(! (node instanceof Element)) {
            return MatchType.NOT_A_MATCH;
        }
        Element element = (Element) node;
        if(this.level != level) {
            return MatchType.NOT_A_MATCH;
        } else if(element.getName().equals(elementName) && element.hasAttribute(attributeName)
                && element.attributeValue(attributeName).equals(attributeValue)) {
            return MatchType.NODE_MATCH;
        }
        return MatchType.NOT_A_MATCH;
    }
865628
public boolean matches(Evidence evidence) {
        return sourceMatches(evidence)
                && confidenceMatches(evidence)
                && name.equalsIgnoreCase(evidence.getName())
                && valueMatches(evidence);
    }
1245124
public static DecomposableMatchBuilder1<Double, Double> caseDouble(MatchesAny d) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(Double.class));
  }
339533
public static DecomposableMatchBuilder1<Float, Float> caseFloat(MatchesAny f) {
    List<Matcher<Object>> matchers = new ArrayList<>();
    matchers.add(any());

    return new DecomposableMatchBuilder1<>(
        matchers, 0, new PrimitiveFieldExtractor<>(Float.class));
  }
1152819
protected static boolean matches( String text , String pattern , boolean ignoreCase )
    {
        if (text == null)
            return false;
        if (pattern.length() == 0)
            return text.length() == 0;
        
        int textPos = 0;
        boolean startWithAny = false;
        StringTokenizer st = new StringTokenizer(pattern,"*?",true);
        while (st.hasMoreTokens())
        {
            String subPattern = st.nextToken();
            
            if (subPattern.equals("*"))
            {
                startWithAny = true;
            }
            else
            if (subPattern.equals("?"))
            {
                if (textPos < text.length())
                    textPos++;
                else
                    return false;
            }
            else
            {
                if (startWithAny)
                {
                    textPos = indexOf(text,subPattern,textPos,ignoreCase);
                    if (textPos == -1) return false;
                    startWithAny = false;
                }
                else
                {
                    if (!startsWith(text,subPattern,textPos,ignoreCase))
                        return false;
                }
                textPos += subPattern.length();
            }
        }
        
        // Remaining text
        if (textPos < text.length())
            if (!startWithAny)
                return false;
        
        return true;
    }
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));
  }
928400
public void setCaseSensitiveMatch(final Boolean caseInsensitive) {
		FilterableBeanBoundDataModel model = getFilterableTableModel();
		if (model != null) {
			model.setCaseSensitiveMatch(caseInsensitive);
		}
	}
535082
def match(match_expr, exc_type, exc_value, exc_traceback):
    
    # Emulate standard behavior when match_expr is an exception subclass.
    if isinstance(match_expr, type) and issubclass(match_expr, BaseException):
        return issubclass(exc_type, match_expr)

    # Match on type and args when match_expr is an exception instance.
    return (
        issubclass(exc_type, type(match_expr))
        and
        match_expr.args == exc_value.args
    )
1043273
function match(source, cases, isExec) {
      if (!isObj(cases)) throwErr('obj');
      if (isUdf(isExec)) isExec = true;
      var symbol = '__@fnMatch__';
      if (has(cases, source)) {
        symbol = source;
      } else if (has(cases, 'default')) {
        symbol = 'default';
      }
      var matched = cases[symbol];
      if (matched === '@next') {
        var ks = keys(cases), i = ks.indexOf(symbol) - 1;
        while (++i < ks.length) if (cases[ks[i]] !== '@next') { matched = cases[ks[i]]; break; }
      }
      if (isExec && isFun(matched)) {
        return len(matched) ? matched(source) : matched();
      } else {
        return matched === '@next' ? UDF : matched;
      }
    }
1031721
public boolean match(String value) {
    value = StringUtils.removeStart(value, "/");
    value = StringUtils.removeEnd(value, "/");
    return pattern.matcher(value).matches();
  }
738046
@Override
	public boolean satisfies(Match match, int... ind)
	{
		assert ind.length == 1;

		return clazz.isAssignableFrom(match.get(ind[0]).getModelInterface());
	}
1231405
public static <T> DefaultCase<T> matchCase(Supplier<Result<T>> value) {
    return new DefaultCase<>(() -> true , value);
  }