Java treeSet in a map
<p>Java newbie, what I am trying to do is retrieve a string name that prints to the screen if one of the multiple values is within a range as follows:</p>

<pre><code>public class SuperHeroes {
private Map&lt;String, Set&lt;Integer&gt;&gt; names;
private Set&lt;Integer&gt; pageNum;

    /**
     * Constructor for objects of class SuperHeroes
     */
    public SuperHeroes() {
        names = new HashMap&lt;&gt;();
        pageNum = new TreeSet&lt;&gt;();
    }

    /**
     * The fill() method creates 2 entries.
     */
    public void fill() {
        pageNum.add(1);
        pageNum.add(3);
        pageNum.add(7);
        names.put("Kent,Clark", pageNum);

        pageNum = new TreeSet&lt;&gt;();
        pageNum.add(2);
        pageNum.add(6);
        pageNum.add(4);
        names.put("Wayne,Bruce", pageNum);
    }

    public void findInRange(int num, int numb) {
        for (String eachName: names.keySet()) {
            for (int eachNum:pageNum) {
                if(eachNum &gt;= num &amp;&amp; eachNum &lt;= numb) {
                    System.out.println(names.get(eachName));
                }
            }      
        }
    }
}
</code></pre>

<p>The result printed to screen would be the name of superhero if the pageNum is within the range. thr output I get at the moment is all the numbers. Any help would be gratefully received. If you can point me in the right direction would be a help.</p>

<p>Thank you in advance.</p>
