java.lang.Object
org.springframework.hateoas.client.Hop

public final class Hop extends Object
Container for customizations to a single traverson "hop"
Since:
0.18
Author:
Greg Turnquist, Oliver Gierke, Manish Misra
  • Method Details

    • rel

      public static Hop rel(String rel)
      Creates a new Hop for the given relation name.
      Parameters:
      rel - must not be null or empty.
      Returns:
    • withParameter

      public Hop withParameter(String name, Object value)
      Add one parameter to the map of parameters.
      Parameters:
      name - must not be null or empty.
      value - can be null.
      Returns:
    • withParameters

      public Hop withParameters(Map<String,Object> parameters)
      Create a new Hop by copying all the attributes and replacing the parameters.
      Parameters:
      parameters -
      Returns:
    • withHeaders

      public Hop withHeaders(HttpHeaders headers)
      Create a new Hop by copying all the attributes and replacing the headers.
      Parameters:
      headers -
      Returns:
    • header

      public Hop header(String headerName, String headerValue)
      Add one header to the HttpHeaders collection.
      Parameters:
      headerName - must not be null or empty.
      headerValue - can be null.
      Returns:
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object