Gets all instances that matches the given type.
548784
public <U extends T> List<U> getAll(Class<U> type) {
        List<U> r = new ArrayList<>();
        for (T t : data)
            if(type.isInstance(t))
                r.add(type.cast(t));
        return r;
    }
433633
public List<Class<?>> getRawTypes(List<DomainObjectType> types) {
		List<Class<?>> resultList = new ArrayList<Class<?>>();
		for (DomainObjectType type : types) {
			resultList.add(type.getType());
		}
		return resultList;
	}
607908
public Collection<? extends VerifierComponent> getAll(VerifierComponentType type) {
        Map<String, VerifierComponent> result = all.get(type);

        if (result == null) {
            return Collections.emptyList();
        } else {
            return result.values();
        }
    }
771245
boolean matches(int type, int child1, int child2) {
        return matches(type, child1) && get(2, true).isA(child2);
    }
263222
def _get_results_by_type(self, type):
        
        instance = self._create_model_by_type(type)

        key = instance.get_key_name()

        query = instance.new_query()

        query = self._use_with_trashed(query)

        return query.where_in(key, self._gather_keys_by_type(type).all()).get()
115074
public static function typeExists()
    {
        $instance = new static;

        $params = $instance->getBasicEsParams();

        return $instance->getElasticSearchClient()->indices()->existsType($params);
    }
1121629
public <T> Map<String, T> findByTypeWithName(Class<T> type) {
        return applicationContext.getBeansOfType(type);
    }
752011
def get_all_supported_types_for_ext(self, ext_to_match: str, strict_type_matching: bool = False) -> Set[Type]:
        
        matching = self.find_all_matching_parsers(required_ext=ext_to_match, strict=strict_type_matching)[0]
        return {typ for types in [p.supported_types for p in (matching[0] + matching[1] + matching[2])]
                for typ in types}
156158
@Override
  public <T> T instance(Class<T> type)
  {
    Key<T> key = Key.of(type);

    return instance(key);
  }
536293
public function find_all_of_type($type) {
        $nodes = $this->children->type($type);
        foreach ($this->children as &$node) {
            $childnodes = $node->find_all_of_type($type);
            $nodes = array_merge($nodes, $childnodes);
        }
        return $nodes;
    }
269368
def get_object_by_type(self, *types):
        
        children = self.get_objects_by_type(*types)
        return children[0] if any(children) else None
612432
def matching(type, list)
      list.map do |plugin|
        (plugins_map(type) || {})[string2class(plugin)]
      end
    end
694549
def _has_instance(data, dtype):
    """"""
    for item in data:
        _, arr = item
        if isinstance(arr, dtype):
            return True
    return False
1177609
public static String getExample(TypeDeclaration type) {
		if (type == null || type.example() == null) {
			return null;
		} else {
			return type.example().value();
		}
	}
1001651
def instance_contains(container, item):
    """"""
    return item in (member for _, member in inspect.getmembers(container))
304564
def _types_match(type1, type2):
        
        if isinstance(type1, six.string_types) and \
                isinstance(type2, six.string_types):
            type1 = type1.rstrip('?')
            type2 = type2.rstrip('?')
            if type1 != type2:
                return False

        return True
1183129
public java.util.List<String> getInstanceTypes() {
        if (instanceTypes == null) {
            instanceTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instanceTypes;
    }