Package org.openrewrite.config
Class CategoryTree<G>
java.lang.Object
org.openrewrite.config.CategoryTree<G>
- Type Parameters:
G- A grouping key that can cross category boundaries. Must implementObject.equals(java.lang.Object)andObject.hashCode(), but there is otherwise no restriction on the type. For example, a grouping key could be aStringthat represents a GAV coordinate of a recipe artifact that contributes recipes to multiple categories.
- Direct Known Subclasses:
CategoryTree.Root
A hierarchical listing of recipe categories and the recipes that are contained inside them.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic <G> CategoryTree.Root<G>build()getCategories(boolean omitCategoryRoots, boolean omitEmptyCategories) Used to recursively navigate the whole category tree without any advance knowledge of what categories exist.getCategory(String subcategory) getCategory(String... subcategories) getCategoryOrThrow(String subcategory) getCategoryOrThrow(String... subcategories) getRecipeGroup(String id) toString()
-
Method Details
-
build
-
getDescriptor
-
getRecipeCount
-
getCategory
-
getCategory
-
getCategoryOrThrow
-
getCategoryOrThrow
-
getRecipe
-
getRecipeGroup
-
getRecipes
-
getRecipesByGroup
-
getCategories
-
getCategories
public Collection<CategoryTree<G>> getCategories(boolean omitCategoryRoots, boolean omitEmptyCategories) Used to recursively navigate the whole category tree without any advance knowledge of what categories exist.- Returns:
- The subcategories of this category.
-
toString
-