java.lang.Object
org.springframework.data.rest.core.Path

public class Path extends Object
Simple value object to build up (URI) paths. Allows easy concatenation of Strings and will take care of removal of whitespace and reducing slashes to single ones.
Author:
Oliver Gierke
  • Constructor Details

    • Path

      public Path(String path)
      Creates a new Path from the given String.
      Parameters:
      path -
  • Method Details

    • matches

      public boolean matches(String reference)
      Returns whether the given reference String matches the current Path.
      Parameters:
      reference -
      Returns:
    • slash

      public Path slash(String path)
      Appends the given String to the current Path.
      Parameters:
      path -
      Returns:
    • slash

      public Path slash(Path path)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object