Class Link
java.lang.Object
org.springframework.restdocs.hypermedia.Link
Representation of a link used in a Hypermedia-based API.
- Author:
- Andy Wilkinson
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Link
Creates a newLinkwith the givenrelandhref.- Parameters:
rel- the link's relhref- the link's href
-
Link
Creates a newLinkwith the givenrel,href, andtitle.- Parameters:
rel- the link's relhref- the link's hreftitle- the link's title
-
-
Method Details
-
getRel
Returns the link'srel.- Returns:
- the link's
rel
-
getHref
Returns the link'shref.- Returns:
- the link's
href
-
getTitle
Returns the link'stitle, ornullif it does not have a title.- Returns:
- the link's
titleornull
-
equals
-
hashCode
public int hashCode() -
toString
-