Here you can find the source of isInArray(final T ch, final T[] a)
public static <T> boolean isInArray(final T ch, final T[] a)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static <T> boolean isInArray(final T ch, final T[] a) { return Arrays.stream(a).anyMatch(item -> ch.equals(item)); }/* w w w. ja v a2s. c o m*/ public static boolean isInArray(final char ch, final char[] a) { for (final char c : a) { if (c == ch) { return true; } } return false; } }