public static List<String> hops(final String rel, final String... moreRels) {
        if (moreRels != null) {
            return new ArrayList<String>() {{
                add(requireNonNull(rel));
                addAll(asList(moreRels));
            }};
        } else {
            return singletonList(requireNonNull(rel));
        }
    }
public static List < String > hops ( final String rel , final String ... moreRels ) { if ( moreRels != null ) { return new ArrayList < String > ( ) { { add ( requireNonNull ( rel ) ) ; addAll ( asList ( moreRels ) ) ; } } ; } else { return singletonList ( requireNonNull ( rel ) ) ; } }
Creates a list of link-relation types used to {@link #follow(List) follow} multiple hops, optionally
using {@link #follow(List, Map) uri template variables}.
<p>
This method is only adding some semantic sugar, so you can write code like this:
</p>
<pre><code>
traverson(this::httpGet)
.startWith("http://example.org")
.follow(
<strong>hops("foo", "bar"),</strong>
withVars("param1", "value1", "param2", "value2"))
.getResource();
</code></pre>

@param rel link-relation type
@param moreRels optionally more link-relation types
@return list of link-relation types