Result
, Iterable<Result.Attribute>
public static class Result.CategoryNode extends Result.Category implements Result
getSubcategories()
, or utility methods such as getSelectedSubcategory()
and findDescendant(String)
.Result.Ad, Result.Ads, Result.Attribute, Result.Category, Result.CategoryData, Result.CategoryList, Result.CategoryNode, Result.Completion, Result.Completions, Result.Correction, Result.Corrections, Result.Count, Result.Facet, Result.FacetList, Result.FacetRange, Result.Phrase, Result.Phrases, Result.Product, Result.Products, Result.ResultType, Result.Value, Result.Values, Result.Variant
Modifier and Type | Method | Description |
---|---|---|
Result.CategoryNode |
findDescendant(String categoryKey) |
Searches for the specified category key among this category and its descendants.
|
Result.CategoryNode |
getParent() |
Get the parent of this category.
|
Result.CategoryNode |
getSelectedSubcategory() |
Get the selected category among this category's subcategories.
|
List<Result.CategoryNode> |
getSubcategories() |
Get a list of this category's subcategories, if they were included in the result.
|
Result.ResultType |
getType() |
Get the result type of this result.
|
boolean |
isSelected() |
Check if this category is a selected category.
|
static Result.CategoryNode |
mock(String key,
String ticket,
Result.CategoryNode parent,
String parentKey,
List<Result.Attribute> attributes,
List<Result.Attribute> specialAttributes) |
Creates a new leaf CategoryNode object for test purposes.
|
static Result.CategoryNode |
mock(String key,
String ticket,
Result.CategoryNode parent,
String parentKey,
List<Result.Attribute> attributes,
List<Result.Attribute> specialAttributes,
List<Result.CategoryNode> subcategories) |
Creates a new CategoryNode object with subcategories for test purposes.
|
equals, getAttribute, getDisplayName, getLocale, getParentKey, getProductCount, getTicket, getValue, getValue, hashCode, iterator, key, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Result.ResultType getType()
Result
public static Result.CategoryNode mock(String key, String ticket, Result.CategoryNode parent, String parentKey, List<Result.Attribute> attributes, List<Result.Attribute> specialAttributes)
key
- the category keyticket
- the category ticketparent
- the category parent objectparentKey
- the parent category keyattributes
- the custom category attributesspecialAttributes
- special attributes not found under the attributes tag, e.g. display_name,
product_count and selected.public static Result.CategoryNode mock(String key, String ticket, Result.CategoryNode parent, String parentKey, List<Result.Attribute> attributes, List<Result.Attribute> specialAttributes, List<Result.CategoryNode> subcategories)
key
- the category keyticket
- the category ticketparent
- the category parent objectparentKey
- the parent category keyattributes
- the custom category attributesspecialAttributes
- special attributes not found under the attributes tag, e.g. display_name,
product_count and selected.subcategories
- the category sub categoriespublic List<Result.CategoryNode> getSubcategories()
public Result.CategoryNode getSelectedSubcategory()
public Result.CategoryNode findDescendant(String categoryKey)
categoryKey
- the key of the category to search forpublic Result.CategoryNode getParent()
public boolean isSelected()
Copyright © 2021 Apptus Technologies AB. All rights reserved.