Here you can find the source of equalsAny(String toMatch, List
Parameter | Description |
---|---|
toMatch | a parameter |
matchesAny | a parameter |
public static boolean equalsAny(String toMatch, List<String> matchesAny)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { /**/* www . java 2 s.c om*/ * * @param toMatch * @param matchesAny * @return */ public static boolean equalsAny(String toMatch, List<String> matchesAny) { return matchesAny != null && matchesAny.contains(toMatch); } /** * * @param toMatch * @param matchesAny * @return */ public static boolean equalsAny(String toMatch, String... matchesAny) { return equalsAny(toMatch, Arrays.asList(matchesAny)); } }