List of usage examples for org.springframework.hateoas Link Link
private Link(UriTemplate template, LinkRelation rel, List<Affordance> affordances)
From source file:org.springframework.hateoas.Link.java
/** * Returns a {@link Link} pointing to the same URI but with the given relation. * * @param rel must not be {@literal null} or empty. * @return// ww w .ja v a2s. c o m */ public Link withRel(String rel) { if (profile != null) { return new Link(href, rel, profile); } return new Link(href, rel); }
From source file:org.springframework.hateoas.Link.java
/** * Returns a {@link Link} pointing to the same URI but with the given profile. * * @param rel must not be {@literal null} or empty. * @return/* w w w . j av a2 s.c om*/ */ public Link withProfile(String profile) { return new Link(href, rel, profile); }