Class Affordances

java.lang.Object
org.springframework.hateoas.mediatype.Affordances
All Implemented Interfaces:
AffordanceOperations

public class Affordances extends Object implements AffordanceOperations
Primary API to construct Affordance instances.
Author:
Oliver Drotbohm, Jongha Park
See Also:
  • Method Details

    • of

      public static Affordances of(Link link)
    • stream

      public Stream<Affordance> stream()
      Returns all Affordances created.
      Returns:
      will never be null.
    • afford

      public ConfigurableAffordance afford(org.springframework.http.HttpMethod httpMethod)
      Creates a new Affordances.AffordanceBuilder for the given HTTP method for further customization. See the wither-methods for details.
      Parameters:
      httpMethod - must not be null.
      Returns:
      will never be null.
    • toLink

      public Link toLink()
      Description copied from interface: AffordanceOperations
      Returns a Link equipped with the Affordance currently under construction.
      Specified by:
      toLink in interface AffordanceOperations
      Returns:
      will never be null.