Class LinkDescriptor


public class LinkDescriptor extends IgnorableDescriptor<LinkDescriptor>
A description of a link found in a hypermedia API.
Author:
Andy Wilkinson
See Also:
  • Constructor Details

    • LinkDescriptor

      protected LinkDescriptor(String rel)
      Creates a new LinkDescriptor describing a link with the given rel.
      Parameters:
      rel - the rel of the link
  • Method Details

    • optional

      public final LinkDescriptor optional()
      Marks the link as optional.
      Returns:
      this
    • getRel

      public final String getRel()
      Returns the rel of the link described by this descriptor.
      Returns:
      the rel
    • isOptional

      public final boolean isOptional()
      Returns true if the described link is optional, otherwise false.
      Returns:
      true if the described link is optional, otherwise false