Java List Contain firstFunnyString(List words, String containedTest)

Here you can find the source of firstFunnyString(List words, String containedTest)

Description

first Funny String

License

Open Source License

Declaration

public static String firstFunnyString(List<String> words, String containedTest) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static String firstFunnyString(List<String> words, String containedTest) {
        String res = words.stream().map(String::toUpperCase).filter(s -> s.length() < 7)
                .filter(s -> s.contains(containedTest)).findFirst().orElse(null);
        return res;
    }//w  ww  .j  a  v a 2 s .  c  o  m
}

Related

  1. containsSubsequence(List a, List b)
  2. containsType(List list, Class type)
  3. containsUnorderedSequence(List a, List b)
  4. containsUsingToArray(List list, Integer value)
  5. containsWhitespace(List elements)
  6. getListValue(Object container, int index)
  7. identityContains(Object o, List list)
  8. indexOfLineContaining(List lines, String s)
  9. isContain(List list, Integer i)