Class PathSegment


  • public class PathSegment
    extends Object
    A path segment that can simple like value like chair or contain matrix parameter values using semi-colon delimitation like chair;vendor=ikea;size=small.

    Matrix parameters are optional 'qualifiers' of the path segment.

    • Constructor Detail

      • PathSegment

        public PathSegment​(String value)
        Create with a given value that may contain matric parameters.
    • Method Detail

      • of

        public static PathSegment of​(String value)
        Create with a given value that may contain matrix parameters.
      • val

        public String val()
        Return the main segment value.

        For "chair" this returns "chair"

        For "chair;vendor=ikea;size=small" this returns "chair"

      • matrix

        public String matrix​(String key)
        Return a metric value for the given key.

        For example, given "chair;vendor=ikea;size=small"

        metric("vendor") returns "ikea".

        Parameters:
        key - The metric key
        Returns:
        The metric value if supplied or null