title: Map<String, Object> - Search Object and add certain values to a set
body: <p>Following on from a previous question, I want to iterate over the Object values in my map, and if certain results found, add them to a Set/List then return that Set/List.</p>
  
  <p>My code for Employer Class:</p>
  
  <pre><code>public class Employer {
      Map&lt;String, NewHire&gt; employee = new HashMap&lt;&gt;();
  }
  
  public void addEmployee(String fullName, String age, String location, String JobTitle) {
      NewHire newEmployee = new NewHire(age, location, JobTitle);
      this.employee.put(fullName, newEmployee);
  }
  </code></pre>
  
  <p>Second Object code:</p>
  
  <pre><code>public class NewHire {
      private String age;
      private String location;
      private String jobTitle;
  }
  
  public NewHire(String aAge, String aLocation, String aJobTitle) {
      this.age = aAge;
       this.location = aLocation;
       this.jobTitle = aJobTitle;
  }
  </code></pre>
  
  <p>And I have added the following:</p>
  
  <pre><code>Employer CompanyA = new Employer();
  CompanyA.addEmployee("JohnSmith1", "22", "London", "Front Office");
  CompanyA.addEmployee("JohnSmith2", "23", "Paris", "Service Desk");
  CompanyA.addEmployee("JohnSmith3", "22", "Paris", "Service Desk");
  CompanyA.addEmployee("JohnSmith4", "21", "New York", "HR");
  </code></pre>
  
  <p>I now want to add the following method:</p>
  
  <pre><code>public NewHire findAnEmployee(String jobTitle)
  </code></pre>
  
  <p>What I need the method to do is looks for all Employees that work in "Service Desk" for example, add them to a Set and return that Set.   And if nobody is found for that position, return a general message that states nobody was found that works there.</p>
  
  <p>I am struggling to grasp how I can do this.  </p>