Package org.opencms.util
Class CmsPathMap<V>
- java.lang.Object
-
- org.opencms.util.CmsPathMap<V>
-
- Type Parameters:
V
- the element type of the path map
public class CmsPathMap<V> extends java.lang.Object
Data structure which stores contents indexed by path.
-
-
Constructor Summary
Constructors Constructor Description CmsPathMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String path, V value)
Adds an element for the given path, overwriting the previous element for that path if there is one.java.util.List<V>
getChildValues(java.lang.String path)
Gets the values for the direct children of the given path.java.util.List<V>
getDescendantValues(java.lang.String path)
Gets the values for the descendants of the path, including the path itself.
-
-
-
Constructor Detail
-
CmsPathMap
public CmsPathMap()
-
-
Method Detail
-
add
public void add(java.lang.String path, V value)
Adds an element for the given path, overwriting the previous element for that path if there is one.- Parameters:
path
- the pathvalue
- the element to add
-
getChildValues
public java.util.List<V> getChildValues(java.lang.String path)
Gets the values for the direct children of the given path.- Parameters:
path
- the path- Returns:
- the child values
-
getDescendantValues
public java.util.List<V> getDescendantValues(java.lang.String path)
Gets the values for the descendants of the path, including the path itself.- Parameters:
path
- the path- Returns:
- the descendant values for the path
-
-