Interface HierarchicalData<T>
- Type Parameters:
T- data type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
TreeData
Represents hierarchical data.
Typically used as a backing data source for
InMemoryHierarchicalDataProvider.
- Since:
- 25.2
- Author:
- Vaadin Ltd
-
Method Summary
-
Method Details
-
getChildren
Get the immediate child items for the given item.- Parameters:
item- the item for which to retrieve child items for, null to retrieve all root items- Returns:
- an unmodifiable list of child items for the given item
- Throws:
IllegalArgumentException- if the item does not exist in this structure
-
getParent
Get the parent item for the given item.- Parameters:
item- the item for which to retrieve the parent item for- Returns:
- parent item for the given item or
nullif the item is a root item. - Throws:
IllegalArgumentException- if the item does not exist in this structure
-
contains
Check whether the given item is in this hierarchy.- Parameters:
item- the item to check- Returns:
trueif the item is in this hierarchy,falseif not
-