Package hof.find.assignment
Class FindHofApps
java.lang.Object
hof.find.assignment.FindHofApps
public class FindHofApps
extends java.lang.Object
- Author:
- __STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors Constructor Description FindHofApps() -
Method Summary
Modifier and Type Method Description static java.util.Optional<java.lang.String>findFirstPalindrome(ImmutableList<java.lang.String> words)Finds the first word in the specified list which is a palindrome.
-
Constructor Details
-
FindHofApps
public FindHofApps()
-
-
Method Details
-
findFirstPalindrome
public static java.util.Optional<java.lang.String> findFirstPalindrome(ImmutableList<java.lang.String> words)Finds the first word in the specified list which is a palindrome. For example, if the input is ["ambulance", "kayak", "racecar", "train"] then Optional.of("kayak") should be returned. For example, if the input is ["ambulance", "train"] then Optional.empty() should be returned.- Parameters:
words- the specified list of words- Returns:
- the filtered list of specified words which contain each of the vowels
-