Checks whether this filter accepts a given kind/mimetype combination.<p>

@param kind the kind
@param mimetype the mime type

@return true if the filter accepts the combination
351486
public boolean accept(String kind, String mimetype) {

        if (m_includeAll) {
            return true;
        }
        int slashpos = mimetype.indexOf("/");
        String supertype = mimetype.substring(0, slashpos);
        return m_kinds.contains(kind) || m_types.contains(mimetype) || m_supertypes.contains(supertype);
    }
356164
public function isAcceptMimetype($mimetype)
    {
        if ($this->hasHeader('Accept')) {
            return $this->isAccept($this->getHeader('Accept'), $mimetype);
        }
        return false;
    }
1187564
function isOutputMIMETypeSupported( $mimeData )
    {
        $mimeTypes = $this->supportedOutputMIMETypes();
        $mimeName = $mimeData;
        if ( is_array( $mimeData ) )
            $mimeName = $mimeData['name'];
        foreach ( $mimeTypes as $mimeType )
        {
            if ( strpos( $mimeType, '*' ) !== false )
            {
                $matchString = eZImageHandler::wildcardToRegexp( $mimeType );
                if ( preg_match( "#^" . $matchString . "$#", $mimeName ) )
                {
                    return true;
                }
            }
            else if ( $mimeType == $mimeName )
            {
                return true;
            }
        }
        return false;
    }
1094670
public function isType(
        array $mimeTypes,
        bool $allowUnverified = false
    ): bool
    {
        $contentType = $this->getContentType($allowUnverified);
        foreach ($mimeTypes as $type) {
            if (strtolower($type) === $contentType) {
                return true;
            }
        }
        return false;
    }
1319980
protected function checkMimeType($mimeType)
    {
        $allow = $this->getWhitelistedMimeTypes();
        $block = $this->getBlacklistedMimeTypes();

        if (false !== $allow) {
            foreach ($allow as $pattern) {
                if ($this->wildCardMatch($mimeType, $pattern)) {
                    return true;
                }
            }

            return false;
        }

        if (false !== $block) {
            foreach ($block as $pattern) {
                if ($this->wildCardMatch($mimeType, $pattern)) {
                    return false;
                }
            }
        }

        return true;
    }
1354195
protected boolean hasMatchingMediaType(MediaType mediaType) {
		if (mediaType != null) {
			String subtype = mediaType.getSubtype();
			return "json".equalsIgnoreCase(subtype) || subtype.endsWith("+json") || "javascript".equals(subtype) || "x-javascript".equals(subtype);
		}
		return true;
	}
1037144
public boolean same(MimeType other) {
	if (this == other) return true;
	return getTypeNotNull().equals(other.getTypeNotNull()) && getSubtypeNotNull().equals(other.getSubtypeNotNull());
    }
1348112
private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) {
        JavaFileObject.Kind kind = getKind(s);
        return fileKinds.contains(kind);
    }
1144561
private boolean matches(ParameterizedType requiredType, ParameterizedType beanType) {
        if (!requiredType.getRawType().equals(beanType.getRawType())) {
            return false;
        }
        if (requiredType.getActualTypeArguments().length != beanType.getActualTypeArguments().length) {
            throw new IllegalArgumentException("Invalid argument combination " + requiredType + "; " + beanType);
        }
        for (int i = 0; i < requiredType.getActualTypeArguments().length; i++) {
            if (!parametersMatch(requiredType.getActualTypeArguments()[i], beanType.getActualTypeArguments()[i])) {
                return false;
            }
        }
        return true;
    }
694267
@Override
    public boolean accepts(String mimeType) {
        String contentType = request.headers().get(HeaderNames.ACCEPT);
        if (contentType == null) {
            contentType = MimeTypes.HTML;
        }
        // For performance reason, we first try a full match:
        if (contentType.contains(mimeType)) {
            return true;
        }
        // Else check the media types:
        MediaType input = MediaType.parse(mimeType);
        for (MediaType type : mediaTypes()) {
            if (input.is(type)) {
                return true;
            }
        }
        return false;
    }
560410
final public Boolean checkPositionType(String type) {
    if (tokenPosition == null) {
      return false;
    } else {
      return tokenPosition.checkType(type);
    }
  }
396836
@Override
    public boolean canRead(@Nonnull MediaType mimeType, Class<?> resultType) {
        MediaType type = mimeType.withoutParameters();
        return (type.is(MediaType.ANY_TEXT_TYPE) || MediaType.APPLICATION_XML_UTF_8.withoutParameters().is(type)
                || MediaType.JSON_UTF_8.withoutParameters().is(type)) && String.class.equals(resultType);
    }
995060
public static boolean isEquals(TypeName value, TypeName kindOfParameter) {
		return value.toString().equals(kindOfParameter.toString());
	}
552490
public static <T extends MethodDescription> ElementMatcher.Junction<T> isGenericSetter(Type type) {
        return isGenericSetter(TypeDefinition.Sort.describe(type));
    }
1177188
function maybeTypeOfKind(type, kind) {
            if (type.flags & kind) {
                return true;
            }
            if (type.flags & 1572864 /* UnionOrIntersection */) {
                var types = type.types;
                for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
                    var t = types_13[_i];
                    if (maybeTypeOfKind(t, kind)) {
                        return true;
                    }
                }
            }
            return false;
        }
1360354
@Override
    public final boolean canRead(MediaType mimeType, Class<?> resultType) {
        return mimeType.is(MediaType.ANY_TYPE) && byte[].class.equals(resultType);
    }
1189574
public boolean matches(final MediaType type) {
        final String star = "*";
        return (this.high.equals(star)
            || type.high.equals(star)
            || this.high.equals(type.high))
            && (this.low.equals(star)
            || type.low.equals(star)
            || this.low.equals(type.low));
    }