Package hof.filter.assignment
Class FilterHofApps
java.lang.Object
hof.filter.assignment.FilterHofApps
public class FilterHofApps
extends java.lang.Object
- Author:
- __STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors Constructor Description FilterHofApps() -
Method Summary
Modifier and Type Method Description static ImmutableList<java.lang.Integer>filterEvens(ImmutableList<java.lang.Integer> xs)Creates and returns a list whose contents are the filtered result of the specified input integers which are even.static ImmutableList<java.lang.String>filterWordsWhichContainAllVowels(ImmutableList<java.lang.String> words)Creates and returns a list whose contents are the filtered result of the specified input words which contain each of the vowels 'a', 'e', 'i', 'o', and 'u'.
-
Constructor Details
-
FilterHofApps
public FilterHofApps()
-
-
Method Details
-
filterWordsWhichContainAllVowels
public static ImmutableList<java.lang.String> filterWordsWhichContainAllVowels(ImmutableList<java.lang.String> words)Creates and returns a list whose contents are the filtered result of the specified input words which contain each of the vowels 'a', 'e', 'i', 'o', and 'u'. The order in the input words must be preserved in the result. For example, if the input is ["parallel", "equation", "concurrent", "tenacious"] then the returned list should be ["equation", "tenacious"].- Parameters:
words- the specified list of words- Returns:
- the filtered list of specified words which contain each of the vowels
-
filterEvens
Creates and returns a list whose contents are the filtered result of the specified input integers which are even. The order in the input integers must be preserved in the result. For example, if the input is [12, 71, 100, 231, 425, 2014, 2018] then the returned list should be [12, 100, 2014, 2018].- Parameters:
xs- the specified list of integers- Returns:
- the filtered list of specified integers which are even
-