org.apache.solr.common.util

## Class PathTrie<T>

- java.lang.Object
- - org.apache.solr.common.util.PathTrie<T>

    public class PathTrie<T>
    extends Object

A utility class to efficiently parse/store/lookup hierarchical paths which are templatized like /collections/{collection}/shards/{shard}/{replica}

### Constructor Summary

Constructors
Constructor and Description
`PathTrie()`
`PathTrie(Set<String> reserved)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static List<String>` `getPathSegments(String path)`
`void` `insert(List<String> parts, Map<String,String> replacements, T o)`
`void` `insert(String path, Map<String,String> replacements, T o)`
`T` `lookup(List<String> path, Map<String,String> templateValues)`
`T` `lookup(String path, Map<String,String> templateValues)`
`T` `lookup(String path, Map<String,String> templateValues, Set<String> paths)`
`static String` `templateName(String templateStr)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PathTrie

    public PathTrie()

#### PathTrie

    public PathTrie(Set<String> reserved)

### Method Detail

#### insert

    public void insert(String path,
                       Map<String,String> replacements,
                       T o)

#### insert

    public void insert(List<String> parts,
                       Map<String,String> replacements,
                       T o)

#### getPathSegments

    public static List<String> getPathSegments(String path)

#### lookup

    public T lookup(String path,
                    Map<String,String> templateValues)

#### lookup

    public T lookup(List<String> path,
                    Map<String,String> templateValues)

#### lookup

    public T lookup(String path,
                    Map<String,String> templateValues,
                    Set<String> paths)

#### templateName

    public static String templateName(String templateStr)