Interface IPathSegment

    • Method Detail

      • toPath

        @NonNull
        default String toPath​(@NonNull
                              IPathFormatter formatter)
        Get the path for this node item using the provided formatter.
        Parameters:
        formatter - the path formatter to use to produce the path
        Returns:
        the formatted path
      • format

        @NonNull
        String format​(@NonNull
                      IPathFormatter formatter)
        Apply formatting for the path segment. This is a visitor pattern that will be called to format each segment in a larger path.
        Parameters:
        formatter - the path formatter
        Returns:
        a textual representation of the path segment
      • getPath

        @NonNull
        default List<IPathSegmentgetPath()
        Get a list of path segments, starting at the root and descending.
        Returns:
        a list of path segments in descending order
      • getPathStream

        @NonNull
        Stream<? extends IPathSegmentgetPathStream()
        Get a stream of path segments, starting at the root and descending.
        Returns:
        a stream of path segments in descending order
      • getNodeItem

        INodeItem getNodeItem()
        Get the value associated with the path segment.
        Returns:
        the value or if no value is associated with this path segment