Returns true if there is any service registered that supports the
category parameter

@param category
@return
338009
public boolean supportsCategory(String category) {
		if (category == null) {
			return false;
		}

		List<String> categories = this.getCategories();
		for (String cat : categories) {
			if (cat.compareToIgnoreCase(category) == 0) {
				return true;
			}
		}

		return false;
	}
875661
public static boolean isServiceEnabled(EntityManager em, Service service) {
        ServiceManagementRecord record = findServiceManagementRecord(em, service);

        return record == null ? true : record.isEnabled();
    }
464420
private Boolean getMatchKindForCategory(MetaMethod aMethod, MetaMethod categoryMethod) {
        CachedClass[] params1 = aMethod.getParameterTypes();
        CachedClass[] params2 = categoryMethod.getParameterTypes();
        if (params1.length != params2.length) return Boolean.FALSE;

        for (int i = 0; i < params1.length; i++) {
            if (params1[i] != params2[i]) return Boolean.FALSE;
        }

        Class aMethodClass = aMethod.getDeclaringClass().getTheClass();
        Class categoryMethodClass = categoryMethod.getDeclaringClass().getTheClass();

        if (aMethodClass==categoryMethodClass) return Boolean.TRUE;
        boolean match = aMethodClass.isAssignableFrom(categoryMethodClass);
        if (match) return Boolean.TRUE;
        return null;
    }
251027
public static boolean isIntCategory(ClassNode type) {
        return  type==byte_TYPE     ||  type==char_TYPE     ||
                type==int_TYPE      ||  type==short_TYPE;
    }
894235
def list_supported_categories():
  
  categories = get_supported_categories(api)
  category_names = [category.name for category in categories]
  print ("Supported account categories by name: {0}".format(
    COMMA_WITH_SPACE.join(map(str, category_names))))
940714
def actions_for_category(category):
    
    actions = set()
    for action, action_category in _action_categories.items():
        if action_category == category:
           actions.add(action)
    return actions
32804
public function isValidModule(string $category, string $class): bool {
        if (isset($this->modules[$category])
          && $class instanceof ModuleInterface) {
            return true;
        }

        return false;
    }
107491
protected function isRootCategory(array $category)
    {

        // load the root category
        $rootCategory = $this->getRootCategory();

        // compare the entity IDs and return the result
        return $rootCategory[MemberNames::ENTITY_ID] === $category[MemberNames::ENTITY_ID];
    }
822892
private static StatisticsContext getContext(String category)
   {
      if (category == null)
      {
         return null;
      }
      return CONTEXTS.get(category);
   }
241320
public boolean contains(final String category, final String checkId) {
		return (rules.containsKey(getRuleKey(category, checkId)));
	}
381901
private PortletCategoryBean filterCategoryFavoritesOnly(PortletCategoryBean category) {

        // Subcategories
        final Set<PortletCategoryBean> subcategories = new HashSet<>();
        category.getSubcategories()
                .forEach(
                        sub -> {
                            final PortletCategoryBean filteredBean =
                                    filterCategoryFavoritesOnly(sub);
                            if (filteredBean != null) {
                                subcategories.add(filteredBean);
                            }
                        });

        // Portlets
        final Set<PortletDefinitionBean> portlets = new HashSet<>();
        category.getPortlets()
                .forEach(
                        child -> {
                            if (child.getFavorite()) {
                                logger.debug(
                                        "Including portlet '{}' because it is a favorite:  {}",
                                        child.getFname());
                                portlets.add(child);
                            } else {
                                logger.debug(
                                        "Skipping portlet '{}' because it IS NOT a favorite:  {}",
                                        child.getFname());
                            }
                        });

        return !subcategories.isEmpty() || !portlets.isEmpty()
                ? PortletCategoryBean.create(
                        category.getId(),
                        category.getName(),
                        category.getDescription(),
                        subcategories,
                        portlets)
                : null;
    }
633209
public static boolean hasOperationType(Operation operation, Class<? extends Operation> operationType)
    {
        if (operation == null)
            return false;

        if (operationType.isAssignableFrom(operation.getClass()))
            return true;

        if (operation instanceof CompositeOperation)
        {
            List<Operation> operations = ((CompositeOperation) operation).getOperations();
            for (Operation childOperation : operations)
            {
                if (hasOperationType(childOperation, operationType))
                    return true;
            }
        }

        return false;
    }
491715
protected function isInCategories(array $category)
    {
        $url = ltrim(wei()->request->getPathInfo(), '/');
        foreach ($category['navs'] as $i => $subCategories) {
            foreach ($subCategories['navs'] as $nav) {
                if ($nav['url'] == $url) {
                    return true;
                }
            }
        }

        return false;
    }
1106292
private function checkAlwaysFalseCategories()
    {
        $filtered = [];
        foreach ($this->categories as $category) {
            if ($category->formula === false) {
                if (null !== $category->examples) {
                    throw new \RuntimeException("The category '{$category->id}' should never occur, but it has examples (so for CLDR it may occur!)");
                }
            } else {
                $filtered[] = $category;
            }
        }
        $this->categories = $filtered;
    }
1369526
public function category($category = null)
  {
    if (null === $category)
    {
      return isset($this->requestConfig['category']) ? $this->requestConfig['category'] : null;
    }

    $this->requestConfig['category'] = $category;

    return $this;
  }
167238
public List<String> getServicesIDByCategory(String category) {
		Set<String> servicesID = services.keySet();
		Iterator<String> it = servicesID.iterator();
		List<String> ids = new ArrayList<String>();

		if (category == null) {
			return ids;
		}

		String key;
		while (it.hasNext()) {
			key = it.next();
			DescribeService service = services.get(key);
			if (service.containsCategory(category)) {
				ids.add(key);
			}
		}

		return ids;
	}
903162
private boolean supportsConnects(String serviceType) {
        return !serviceType.equals("jms") &&
                !serviceType.equals("echo") &&
                !serviceType.equals("management.jmx") &&
                !serviceType.equals("$management.jmx$") &&
                !serviceType.equals("management.snmp") &&
                !serviceType.equals("$management.snmp$") &&
                !serviceType.equals("directory");
    }