Here you can find the source of equalsToAny(Object comparable, Object... compareList)
public static boolean equalsToAny(Object comparable, Object... compareList)
//package com.java2s; import java.util.Arrays; public class Main { public static boolean equalsToAny(Object comparable, Object... compareList) { return Arrays.asList(compareList).contains(comparable); }//from www.j av a 2s .c o m }