Class PathUtil


  • public final class PathUtil
    extends java.lang.Object
    Utility class for paths.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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] .
      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 .
      static java.lang.String toPath​(java.util.List<Token> tokens)
      Returns the path for a list of tokens.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 path
        key - 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 path
        index - current index
        Returns:
        path for index