- java.lang.Object
-
- org.github.gestalt.config.utils.PathUtil
-
public final class PathUtil extends java.lang.ObjectUtility class for paths.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringpathForIndex(java.lang.String path, int index)used to generate a path wit the next index in the format path[index] .static java.lang.StringpathForKey(java.lang.String path, java.lang.String key)used to generate a path wit the next key in the format path.key .static java.lang.StringtoPath(java.util.List<Token> tokens)Returns the path for a list of tokens.
-
-
-
Method Detail
-
toPath
public static java.lang.String toPath(java.util.List<Token> tokens)
Returns the path for a list of tokens.- Parameters:
tokens- list of tokens on the path.- Returns:
- the path built from the tokens
-
pathForKey
public static java.lang.String pathForKey(java.lang.String path, java.lang.String key)used to generate a path wit the next key in the format path.key .- Parameters:
path- current pathkey- current key- Returns:
- path for key
-
pathForIndex
public static java.lang.String pathForIndex(java.lang.String path, int index)used to generate a path wit the next index in the format path[index] .- Parameters:
path- current pathindex- current index- Returns:
- path for index
-
-