/*
(non-Javadoc)

@see org.apache.myfaces.view.facelets.tag.TagLibrary#containsTagHandler(java.lang.String, java.lang.String)
325288
public boolean containsTagHandler(String ns, String localName)
    {
        return containsNamespace(ns) && _factories.containsKey(localName);
    }
221676
private function findHandlerClassName(string $tagName, TypeContext $context): string
    {
        $handlerClassName = Generic::class;
        if (isset($this->tagHandlerMappings[$tagName])) {
            $handlerClassName = $this->tagHandlerMappings[$tagName];
        } elseif ($this->isAnnotation($tagName)) {
            // TODO: Annotation support is planned for a later stage and as such is disabled for now
            // $tagName = (string)$this->fqsenResolver->resolve($tagName, $context);
            // if (isset($this->annotationMappings[$tagName])) {
            //     $handlerClassName = $this->annotationMappings[$tagName];
            // }
        }

        return $handlerClassName;
    }
641065
public static boolean matchesTags(Element e, String... tagNames) {

    assert e != null : "Element cannot be null";

    StringBuilder regExp = new StringBuilder("^(");
    int tagNameLenght = tagNames != null ? tagNames.length : 0;
    for (int i = 0; i < tagNameLenght; i++) {
      regExp.append(tagNames[i].toUpperCase());
      if (i < tagNameLenght - 1) {
        regExp.append("|");
      }
    }
    regExp.append(")$");

    return e.getTagName().toUpperCase().matches(regExp.toString());
  }
688407
private boolean checkSimpleExpression(String tagExpression, List<String> scenarioTags) {
        Set<String> expressionTags = extractTagsFromSimpleExpression(tagExpression);

        for (String expressionTag : expressionTags) {
            if (expressionTag.startsWith("@")) {
                if (!scenarioTags.contains(expressionTag)) {
                    //this tag is not listed on the scenario so don't execute
                    return false;
                }
            } else if (expressionTag.startsWith("!")) {
                String expressionTagWithoutNot = expressionTag.substring(1, expressionTag.length());
                if (scenarioTags.contains(expressionTagWithoutNot)) {
                    //this is a negated tag and it exists on the scenario so don't execute
                    return false;
                }
            } else {
                throw new IllegalStateException(String.format("'%s' is not a valid tag, no @ or !@ prefix", expressionTag));
            }
        }

        //there are no reasons left for not executing
        return true;
    }
1276849
public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException
    {
        if (containsNamespace(ns))
        {
            Map<String, TagHandlerFactory> map = _factories.get(ns);
            if (map == null)
            {
                map = new HashMap<String, TagHandlerFactory>();
                _factories.put(ns, map);
            }
            TagHandlerFactory f = map.get(localName);
            if (f != null)
            {
                return f.createHandler(tag);
            }
        }
        
        return null;
    }
478878
public static void supportShowOnLoaderCallback(final android.support.v4.app.FragmentManager manager, final android.support.v4.app.DialogFragment fragment, final String tag) {
        supportShowOnLoaderCallback(HandlerUtils.getMainHandler(), manager, fragment, tag);
    }
394747
private final boolean isAlone(
        String tagName,
        String aloneTags[]
    ) {
        if (aloneTags == null)
            return false;

        if (tagName == null)
            return false;

        for (int i = 0; i < aloneTags.length; i++) {
            if (tagName.equalsIgnoreCase(aloneTags[i]))
                return true;
        }

        return false;
    }
1293362
public boolean contains(Matcher matcher) {
        return element.matcher == matcher || (parent != null && parent.contains(matcher));
    }
44845
public TagCrawler addHandler(String name, TagHandler handler) {
        handlers.put(name, handler);
        return this;
    }
1250119
@Override
  public boolean contains(IVersion version)
  {
    return range1.contains(version) && range2.contains(version);
  }
1164497
@GwtIncompatible("java.util.regex.Pattern")
  public void containsMatch(Pattern regex) {
    if (!regex.matcher(actual()).find()) {
      failWithActual("expected to contain a match for", regex);
    }
  }
115919
public static boolean isInHeader(final String scriptname) {
    final NodeList scriptList =
        Browser.getDocument().getHead().getElementsByTagName(JsResources.TAG_TYPE);
    for (int i = 0; i < scriptList.getLength(); i++) {
      final ScriptElement scriptTag = (ScriptElement) scriptList.item(i);
      if (StringUtils.contains(scriptTag.getSrc(), scriptname)) {
        return true;
      }
    }
    return false;
  }
881984
@Override
    public boolean contains(final String varName) {
        return runWithContext(new RhinoCallable<Boolean, RuntimeException>() {
            @Override
            protected Boolean doCall(Context cx, Scriptable scope) {
                return scope.get(varName, scope) != null;
            }
        });
    }
590495
protected boolean checkHandler(ZoneHandlerClass handler, ApiZone apiZone) {
        return apiZone.getName().startsWith(handler.getZoneName());
    }
1285244
protected final void addTagHandler(String name, Class<? extends TagHandler> handlerType)
    {
        _factories.put(name, new HandlerFactory(handlerType));
    }
870001
protected static void add(String tagName, Class<? extends IConditHandler> handlerCls) {
        tagHandlerMap.put(tagName, new TagHandler(handlerCls));
    }
1236390
public static boolean contains(String target, List<String> containWith) {
		if (isNull(target)) {
			return false;
		}
		
		return matcher(target).contains(containWith);
	}