Returns a Predicate that is matching links having the specified type {@link Link#getType() type}

@param type the expected media type of the link
@return Predicate used to select links
501648
public static Predicate<Link> havingType(final String type) {
        return link -> type.equals(link.getType());
    }
671576
public BaseTypeId getBaseTypeId(final Class<? extends GraphObject> type) {

		final CMISInfo info = getCMISInfo(type);
		if (info != null) {

			return info.getBaseTypeId();
		}

		return null;
	}
909923
@CheckResult
    @NonNull
    public final <O> Data<O> filter(@NonNull final Class<O> type) {
        //noinspection unchecked
        return (Data<O>) new FilterData<>(this, new Predicate<Object>() {
            @Override
            public boolean apply(Object o) {
                return type.isInstance(o);
            }
        });
    }
504924
@Override
	public LinkRelation getItemResourceRelFor(Class<?> type) {

		LookupContext context = LookupContext.forItemResourceRelLookup(type);

		return providers.getRequiredPluginFor(context).getItemResourceRelFor(type);
	}
1105546
public static Predicate<ItemInfo> type(final ConfigItem... types) {
        final List<ConfigItem> target = Arrays.asList(types);
        return input -> target.contains(input.getItemType());
    }
829720
public static Node getEnclosingType(Node n, final Token type) {
    return getEnclosingNode(
        n,
        new Predicate<Node>() {
          @Override
          public boolean apply(Node n) {
            return n.getToken() == type;
          }
        });
  }
941647
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setType(final String type) {
        pathBuilder.setType(type);
        return (T) this;
    }
348210
protected IndexType getIndexType(String type)
    {
        type = type.toLowerCase();
        if ("keys".equals(type))
            return IndexType.KEYS;
        else if("custom".equals(type))
            return IndexType.CUSTOM;
        else if("composites".equals(type))
            return IndexType.COMPOSITES;
        else
            return null;
    }
115187
@SuppressWarnings("static-method")
	protected List<JvmTypeParameter> getTypeParametersFor(XtendTypeDeclaration type) {
		if (type instanceof XtendClass) {
			return ((XtendClass) type).getTypeParameters();
		}
		if (type instanceof XtendInterface) {
			return ((XtendInterface) type).getTypeParameters();
		}
		return Collections.emptyList();
	}
830353
public static Predicate<ExtensionItemInfo> installedBy(final Class<? extends FeatureInstaller> type) {
        return input -> type.equals(input.getInstalledBy());
    }
1200003
protected void getLinkForWildcard(Content link, LinkInfo linkInfo, Type type) {
		linkInfo.isTypeBound = true;
		link.addContent("?"); //$NON-NLS-1$
		final WildcardType wildcardType = type.asWildcardType();
		final Type[] extendsBounds = wildcardType.extendsBounds();
		final SARLFeatureAccess kw = Utils.getKeywords();
		for (int i = 0; i < extendsBounds.length; i++) {
			link.addContent(i > 0 ? kw.getCommaKeyword() + " " //$NON-NLS-1$
					: " " + kw.getExtendsKeyword() + " "); //$NON-NLS-1$ //$NON-NLS-2$
			setBoundsLinkInfo(linkInfo, extendsBounds[i]);
			link.addContent(getLink(linkInfo));
		}
		final Type[] superBounds = wildcardType.superBounds();
		for (int i = 0; i < superBounds.length; i++) {
			link.addContent(i > 0 ? kw.getCommaKeyword() + " " //$NON-NLS-1$
					: " " + kw.getSuperKeyword() + " "); //$NON-NLS-1$ //$NON-NLS-2$
			setBoundsLinkInfo(linkInfo, superBounds[i]);
			link.addContent(getLink(linkInfo));
		}
	}
155443
public boolean containsOfType(final Class<? extends Tag> type) {
	read.lock();
	try {
	    return tags.containsKey(type);
	} finally {
	    read.unlock();
	}
    }
707727
public <T extends Mapping> T findMapping(MappingType type)
    {
        return (T) this.findMapping(type, DEFAULT_PREDICATE);
    }
567240
protected void getLinkForTypeVariable(Content link, LinkInfo linkInfo, Type type) {
		link.addContent(getTypeAnnotationLinks(linkInfo));
		linkInfo.isTypeBound = true;
		final Doc owner = type.asTypeVariable().owner();
		if ((!linkInfo.excludeTypeParameterLinks) && owner instanceof ClassDoc) {
			linkInfo.classDoc = (ClassDoc) owner;
			final Content label = newContent();
			label.addContent(type.typeName());
			linkInfo.label = label;
			link.addContent(getClassLink(linkInfo));
		} else {
			link.addContent(type.typeName());
		}
		final Type[] bounds = type.asTypeVariable().bounds();
		if (!linkInfo.excludeTypeBounds) {
			linkInfo.excludeTypeBounds = true;
			final SARLFeatureAccess kw = Utils.getKeywords();
			for (int i = 0; i < bounds.length; ++i) {
				link.addContent(i > 0 ? " " + kw.getAmpersandKeyword() + " " //$NON-NLS-1$ //$NON-NLS-2$
						: " " + kw.getExtendsKeyword() + " "); //$NON-NLS-1$ //$NON-NLS-2$
				setBoundsLinkInfo(linkInfo, bounds[i]);
				link.addContent(getLink(linkInfo));
			}
		}
	}
607670
public <T extends Mapping> T getMapping(MappingType type)
    {
        return (T) mappings.get(type);
    }
210276
public String getLiteralType(Type type) {
		String result = "";
		if (type != null) {
			if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
				ParameterizedType parameterizedType = (ParameterizedType) type;
				result = parameterizedType.toString();
			} else {
				result = ((Class) type).getCanonicalName();
			}
		}
		return result;
	}
1025851
function Builder(mediaType, linkType) {
  this.mediaType = mediaType || mediaTypes.CONTENT_NEGOTIATION;
  this.linkType = linkType || 'link-rel';
  this.adapter = this._createAdapter(this.mediaType);
  this.autoHeaders = true;
  this.contentNegotiation = true;
  this.rawPayloadFlag = false;
  this.convertResponseToObjectFlag = false;
  this.links = [];
  this.jsonParser = JSON.parse;
  this.requestModuleInstance = standardRequest;
  this.requestOptions = {};
  this.resolveRelativeFlag = false;
  this.preferEmbedded = false;
  this.lastTraversalState = null;
  this.continuation = null;
  // Maintenance notice: when extending the list of configuration parameters,
  // also extend this.newRequest and initFromTraversalState
}