spring-hateoas-ext/src/main/java/de/escalon/hypermedia/spring/AffordanceBuilder.java
public Affordance build() {
        Assert.state(!(rels.isEmpty() && reverseRels.isEmpty()),
                "no rels or reverse rels found, call rel() or rev() before building the affordance");
        final Affordance affordance;
        affordance = new Affordance(new PartialUriTemplate(this.toString()), actionDescriptors,
                rels.toArray(new String[rels.size()]));
        for (Map.Entry<String, List<String>> linkParamEntry : linkParams.entrySet()) {
            final List<String> values = linkParamEntry.getValue();
            for (String value : values) {
                affordance.addLinkParam(linkParamEntry.getKey(), value);
            }
        }
        for (String reverseRel : reverseRels) {
            affordance.addRev(reverseRel);
        }
        affordance.setCollectionHolder(collectionHolder);
        return affordance;
    }
public Affordance build() {
        Assert.state(!(rels.isEmpty() && reverseRels.isEmpty()),
                "no rels or reverse rels found, call rel() or rev() before building the affordance");
        final Affordance affordance;
        affordance = new Affordance(new PartialUriTemplate(this.toString()), actionDescriptors,
                rels.toArray(new String[rels.size()]));
        for (Map.Entry<String, List<String>> linkParamEntry : linkParams.entrySet()) {
            final List<String> values = linkParamEntry.getValue();
            for (String value : values) {
                affordance.addLinkParam(linkParamEntry.getKey(), value);
            }
        }
        for (String reverseRel : reverseRels) {
            affordance.addRev(reverseRel);
        }
        affordance.setCollectionHolder(collectionHolder);
        return affordance;
    }
Builds affordance with one or multiple rels which must have been defined previously using {@link #rel(String)} or
{@link #reverseRel(String, String)}. <p>The motivation for multiple rels is this statement in the web linking
rfc-5988: &quot;Note that link-values can convey multiple links between the same target and context IRIs; for
example:</p>
<pre>
Link: &lt;http://example.org/&gt;
rel="start http://example.net/relation/other"
</pre>
Here, the link to 'http://example.org/' has the registered relation type 'start' and the extension relation type
'http://example.net/relation/other'.&quot;

@return affordance
@see <a href="https://tools.ietf.org/html/rfc5988#section-5.5">Web Linking Examples</a>