Package filter.studio

Class FilterUtils

java.lang.Object
filter.studio.FilterUtils

public class FilterUtils extends Object
Author:
__STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Details

    • FilterUtils

      public FilterUtils()
  • Method Details

    • filter

      public static <E> List<E> filter​(Predicate<E> predicate, List<E> list)
      Creates and returns a list whose contents are the filtered result of the specified input's elements which pass the predicate's test. The order in the input must be preserved in the result.
      Parameters:
      predicate - predicate to test each item in the specified list as to whether it should be included or not in the result.
      list - the specified list of items.
      Returns:
      a list consisting of the elements which pass the predicate's test