Class PathMap<T>
java.lang.Object
org.apache.jackrabbit.spi.commons.name.PathMap<T>
Generic path map that associates information with the individual path elements
of a path.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInternal class holding the object associated with a certain path element.static interfaceElement visitor used intraverse(org.apache.jackrabbit.spi.commons.name.PathMap.ElementVisitor<T>, boolean) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap a path to a child.Create an empty child given by its path.voidput(Path path, PathMap.Element<T> element) Put an element given by its path.Create an element given by its path.voidtraverse(PathMap.ElementVisitor<T> visitor, boolean includeEmpty) Traverse the path map and call back requester.
-
Constructor Details
-
PathMap
public PathMap()
-
-
Method Details
-
map
Map a path to a child. Ifexactisfalse, returns the last available item along the path that is stored in the map.- Parameters:
path- path to mapexact- flag indicating whether an exact match is required- Returns:
- child, maybe
nullifexactistrue
-
put
Create an element given by its path. The path map will create any necessary intermediate elements.- Parameters:
path- path to childobj- object to store at destination
-
put
Put an element given by its path. The path map will create any necessary intermediate elements.- Parameters:
path- path to childelement- element to store at destination
-
put
Create an empty child given by its path.- Parameters:
path- path to child
-
traverse
Traverse the path map and call back requester. This method visits the root first, then its children.- Parameters:
includeEmpty- iftrueinvoke call back on every child regardless, whether the associated object is empty or not; otherwise call back on non-empty children only
-