public class PathMap<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PathMap.Element<T>
Internal class holding the object associated with a certain
path element.
|
static interface |
PathMap.ElementVisitor<T>
Element visitor used in
traverse(org.apache.jackrabbit.spi.commons.name.PathMap.ElementVisitor<T>, boolean) |
Constructor and Description |
---|
PathMap() |
Modifier and Type | Method and Description |
---|---|
PathMap.Element<T> |
map(Path path,
boolean exact)
Map a path to a child.
|
PathMap.Element<T> |
put(Path path)
Create an empty child given by its path.
|
void |
put(Path path,
PathMap.Element<T> element)
Put an element given by its path.
|
PathMap.Element<T> |
put(Path path,
T obj)
Create an element given by its path.
|
void |
traverse(PathMap.ElementVisitor<T> visitor,
boolean includeEmpty)
Traverse the path map and call back requester.
|
public PathMap.Element<T> map(Path path, boolean exact)
exact
is false
,
returns the last available item along the path that is stored in the map.path
- path to mapexact
- flag indicating whether an exact match is requirednull
if exact
is
true
public PathMap.Element<T> put(Path path, T obj)
path
- path to childobj
- object to store at destinationpublic void put(Path path, PathMap.Element<T> element)
path
- path to childelement
- element to store at destinationpublic PathMap.Element<T> put(Path path)
path
- path to childpublic void traverse(PathMap.ElementVisitor<T> visitor, boolean includeEmpty)
includeEmpty
- if true
invoke call back on every child
regardless, whether the associated object is empty
or not; otherwise call back on non-empty children
onlyCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.