public class LinkDescriptor extends AbstractDescriptor<LinkDescriptor>
HypermediaDocumentation.linkWithRel(String)
Modifier | Constructor and Description |
---|---|
protected |
LinkDescriptor(String rel)
Creates a new
LinkDescriptor describing a link with the given rel . |
Modifier and Type | Method and Description |
---|---|
LinkDescriptor |
description(String description)
Specifies the description of the link
|
String |
getDescription()
Returns the description for the link
|
String |
getRel()
Returns the rel of the link described by this descriptor
|
boolean |
isOptional()
Returns
true if the described link is optional, otherwise false |
LinkDescriptor |
optional()
Marks the link as optional
|
attributes, getAttributes
protected LinkDescriptor(String rel)
LinkDescriptor
describing a link with the given rel
.rel
- the rel of the linkpublic final LinkDescriptor description(String description)
description
- The link's descriptionthis
public final LinkDescriptor optional()
this
public final String getRel()
public final String getDescription()
public final boolean isOptional()
true
if the described link is optional, otherwise false
true
if the described link is optional, otherwise false