Filter, which returns true if at least one given type occurred

@param types int, which can have one or more types
@return true if at least one given type occurred
770437
public static Predicate<Connectivity> hasType(final int... types) {
    final int[] extendedTypes = appendUnknownNetworkTypeToTypes(types);
    return new Predicate<Connectivity>() {
      @Override public boolean test(@NonNull Connectivity connectivity) throws Exception {
        for (int type : extendedTypes) {
          if (connectivity.type() == type) {
            return true;
          }
        }
        return false;
      }
    };
  }
1139128
public void onClearTypes(List<String> types) {

        if (types != null) {
            m_galleryDialog.getTypesTab().uncheckTypes(types);
        }
    }
560410
final public Boolean checkPositionType(String type) {
    if (tokenPosition == null) {
      return false;
    } else {
      return tokenPosition.checkType(type);
    }
  }
938266
@Nonnull
    public static <T> List<T> filter( @Nonnull Iterable<?> base, @Nonnull Class<T> type ) {
        List<T> r = new ArrayList<>();
        for (Object i : base) {
            if(type.isInstance(i))
                r.add(type.cast(i));
        }
        return r;
    }
377805
@SafeVarargs
  public static boolean hasNodesOfType(Node node, final Class<? extends Node>... types) {
    class Visitor implements NodeVisitor<Node, VisitDirective> {
      boolean found;

      @Override
      public VisitDirective exec(Node node) {
        for (Class<?> type : types) {
          if (type.isInstance(node)) {
            found = true;
            return VisitDirective.ABORT;
          }
        }
        return VisitDirective.CONTINUE;
      }
    }
    Visitor v = new Visitor();
    visitAllNodes(node, v);
    return v.found;
  }
139877
public SearchResponse searchAllWithTargetCount(String[] indices,
            String[] types) {
        return searchAllWithTargetCount(indices, types, null, null);
    }
207336
static boolean isSingleton(Types types, TypeElement element) {
    return isSingleton(types, element, element.asType());
  }
421029
public List<ZuulFilter> getFiltersByType(FilterType filterType) {

        List<ZuulFilter> list = hashFiltersByType.get(filterType);
        if (list != null) return list;

        list = new ArrayList<ZuulFilter>();

        Collection<ZuulFilter> filters = filterRegistry.getAllFilters();
        for (Iterator<ZuulFilter> iterator = filters.iterator(); iterator.hasNext(); ) {
            ZuulFilter filter = iterator.next();
            if (filter.filterType().equals(filterType)) {
                list.add(filter);
            }
        }

        // Sort by filterOrder.
        Collections.sort(list, new Comparator<ZuulFilter>() {
            @Override
            public int compare(ZuulFilter o1, ZuulFilter o2) {
                return o1.filterOrder() - o2.filterOrder();
            }
        });

        hashFiltersByType.putIfAbsent(filterType, list);
        return list;
    }
33954
protected boolean shouldExcludeType(Class<?> type) {
        for (Class<?> t : excludedFieldTypes) {
            if (t.isAssignableFrom(type)) {
                return true;
            }
        }
        return false;
    }
57658
@Nonnull
    public static <T> List<T> filter( @Nonnull List<?> base, @Nonnull Class<T> type ) {
        return filter((Iterable)base,type);
    }
140159
public boolean isKindOf(final org.efaps.admin.datamodel.Type _type)
    {
        return getType().isKindOf(_type);
    }
899304
public static boolean overrides(
      DeclaredType type, Types types, String methodName, TypeMirror... params) {
    return overrides(asElement(type), types, methodName, params);
  }
668243
private static boolean containsTypeVariables(final Type type) {
        if (type instanceof TypeVariable<?>) {
            return true;
        }
        if (type instanceof Class<?>) {
            return ((Class<?>) type).getTypeParameters().length > 0;
        }
        if (type instanceof ParameterizedType) {
            for (final Type arg : ((ParameterizedType) type).getActualTypeArguments()) {
                if (containsTypeVariables(arg)) {
                    return true;
                }
            }
            return false;
        }
        if (type instanceof WildcardType) {
            final WildcardType wild = (WildcardType) type;
            return containsTypeVariables(TypeUtils.getImplicitLowerBounds(wild)[0])
                    || containsTypeVariables(TypeUtils.getImplicitUpperBounds(wild)[0]);
        }
        return false;
    }
869976
def has_type(type, names):
    """"""
    if type.arg in names:
        return type
    for t in type.search('type'): # check all union's member types
        r = has_type(t, names)
        if r is not None:
            return r
    if not hasattr(type, 'i_typedef'):
        return None
    if (type.i_typedef is not None and
        hasattr(type.i_typedef, 'i_is_circular') and
        type.i_typedef.i_is_circular == False):
        t = type.i_typedef.search_one('type')
        if t is not None:
            return has_type(t, names)
    return None
506627
public boolean hasConversion(String type) {
		if ((isImplicitSarlTypes() && type.startsWith(IMPLICIT_PACKAGE))
			|| isImplicitJvmTypes()) {
			return true;
		}
		if (this.mapping == null) {
			this.mapping = initMapping();
		}
		return this.mapping.containsKey(type);
	}
933326
public boolean hasAncestorOfType( Set<Type> types ) {
        PlanNode node = this.parent;
        while (node != null) {
            if (types.contains(node.getType())) return true;
            node = node.getParent();
        }
        return false;
    }
116439
public boolean shouldBeExcluded(final Class<?> type, final RandomizerContext context) {
        Set<Predicate<Class<?>>> typeExclusionPredicates = context.getParameters().getTypeExclusionPredicates();
        for (Predicate<Class<?>> typeExclusionPredicate : typeExclusionPredicates) {
            if (typeExclusionPredicate.test(type)) {
                return true;
            }
        }
        return false;
    }