title: Intersection and union of ArrayLists in Java
body: <p>Are there any methods to do so? I was looking but couldn't find any.</p>
  
  <p>Another question: I need these methods so I can filter files. 
  Some are <code>AND</code> filters and some are <code>OR</code> filters (like in set theory), so I need to filter according to all files and the unite/intersects ArrayLists that holds those files.</p>
  
  <p>Should I use a different data structure to hold the files? Is there anything else that would offer a better runtime?</p>