code: public static <T> List<T> subList(List<T> list, Criteria<T> criteria) {
          ArrayList<T> subList = new ArrayList<T>();
          for(T item : list) {
              if(criteria.meetsCriteria(item)) {
                  subList.add(item);
              }
          }
          return subList;
      }
docs: Extract a sub list from another list
  @param list original list
  @param criteria criteria used to determine whether or not to extract item
  @param <T> list type
  @return {@code List} of sub list items