// Declare and Initialize the Collection Set<Integer> intSet = new HashSet<Integer>(); // Add Elements intSet.add(1); intSet.add(2); intSet.add(3); intSet.add(4); // Specify the Predicate or the Condition using Lambda expressions Predicate<Integer> moreThan2Pred = (p) -> (p > 2); // Use the stream method allMatch to see if all elements fulfils the Predicate.