title: How to check if enum value exists in a list of objects
body: <p>I have enum and I have no trouble iterating over its values like this:</p>
  
  <pre><code>for(catType ct : catType.values()) {
          if(ct.toString().equals()))
  }
  </code></pre>
  
  <p>I have List of objects where every object has(or does not have) a property matching the values from the enum.</p>
  
  <pre><code>List&lt;Zoo&gt; zoos = zooRepository.findAll();
  </code></pre>
  
  <p>To get a String I need from first index of zoos I must</p>
  
  <pre><code>zoos.get(0).getAnimal();
  </code></pre>
  
  <p>How can I iterate over all catTypes so I can check if they exist in any object from the List of objects, so if they don't exist there I can further add them to the database?</p>