Paths (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.graphdb.traversal

## Class Paths

- java.lang.Object
- - org.neo4j.graphdb.traversal.Paths

-     public class Paths
      extends Object

  Utilities for `Path` objects.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Paths.DefaultPathDescriptor<T extends Path>` The default `Paths.PathDescriptor` used in common toString() representations in classes implementing `Path`.
    `static interface` | `Paths.PathDescriptor<T extends Path>` Provides hooks to help build a string representation of a `Path`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Paths()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `defaultPathToString(Path path)` TODO: This method re-binds nodes and relationships.
    `static <T extends Path> String` | `pathToString(T path, Paths.PathDescriptor<T> builder)` Method for building a string representation of a `Path`, using the given `builder`.
    `static String` | `simplePathToString(Path path)` Returns a quite simple string representation of a `Path`.
    `static String` | `simplePathToString(Path path, String nodePropertyKey)` Returns a quite simple string representation of a `Path`.

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

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

- - ### Constructor Detail

    - #### Paths

          public Paths()

  - ### Method Detail

    - #### pathToString

          public static <T extends Path> String pathToString(T path,
                                             Paths.PathDescriptor<T> builder)

      Method for building a string representation of a `Path`, using the given `builder`.
      Type Parameters:
        `T` - the type of `Path`.
      Parameters:
        `path` - the `Path` to build a string representation of.
        `builder` - the `Paths.PathDescriptor` to get `Node` and `Relationship` representations from.
      Returns:
        a string representation of a `Path`.

    - #### defaultPathToString

          public static String defaultPathToString(Path path)

      TODO: This method re-binds nodes and relationships. It should not. Returns the default string representation of a `Path`. It uses the `Paths.DefaultPathDescriptor` to get representations.
      Parameters:
        `path` - the `Path` to build a string representation of.
      Returns:
        the default string representation of a `Path`.

    - #### simplePathToString

          public static String simplePathToString(Path path)

      Returns a quite simple string representation of a `Path`. It doesn't print relationship types or ids, just directions.
      Parameters:
        `path` - the `Path` to build a string representation of.
      Returns:
        a quite simple representation of a `Path`.

    - #### simplePathToString

          public static String simplePathToString(Path path,
                                  String nodePropertyKey)

      Returns a quite simple string representation of a `Path`. It doesn't print relationship types or ids, just directions. it uses the `nodePropertyKey` to try to display that property value as in the node representation instead of the node id. If that property doesn't exist, the id is used.
      Parameters:
        `path` - the `Path` to build a string representation of.
      Returns:
        a quite simple representation of a `Path`.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.