com.vaadin.flow.templatemodel.
Class PathLookup<T>
- java.lang.Object
-
- com.vaadin.flow.templatemodel.PathLookup<T>
-
Type Parameters:
T
- the item type
public class PathLookup<T> extends Object
A map for items that are looked up by hierarchical keys made up of period separated strings.
Since:
1.0
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method and Description PathLookup<T>
compose(Map<String,T> newItems, String pathPrefix)
Composes a new path lookup that contains all items of this path lookup and all provided items supplemented with the provided path prefix.
static <T> PathLookup<T>
empty()
Creates an empty path lookup.
Optional<T>
getItem(String fullPath)
Gets the item for the provided full path.
-
-
-
Method Detail
-
compose
public PathLookup<T> compose(Map<String,T> newItems, String pathPrefix)
Composes a new path lookup that contains all items of this path lookup and all provided items supplemented with the provided path prefix.
Parameters:
newItems
- new items to include in the compositionpathPrefix
- the prefix to include in the key of all new itemsReturns:
a new path lookup composition
-
empty
public static <T> PathLookup<T> empty()
Creates an empty path lookup.
Type Parameters:
T
- the item typeReturns:
and empty path lookup
-
-