Using methods without returning results is a good thing?
<p>Is a good thing use methods that receive an object and set the attributes of that object inside the method instead of returning the result?</p>

<p>There are situations where returning the results will need two similar methods with a few differences.</p>

<p>Technically, on way will don't need "code duplication" and will do the things faster, but I think the code isn't clear when there aren't returning results.</p>

<p><strong>Example of an HTML analyser</strong>:</p>

<pre><code>void parseLinks(Page page){
    //processing
    page.setLinks(links);
    page.setEmails(emails);
    //page.set...;
}
</code></pre>

<p><strong>or</strong></p>

<pre><code>List&lt;Link&gt; getLinks(SomeParameter parameter){
    //same processing
    return links;
}

List&lt;Email&gt; getEmails(SomeParameter parameter){
    //same processing
    return emails;
}

page.setLinks(getLinks(parameter));
page.setEmails(getEmails(parameter));
//page.set...
</code></pre>
