/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link String#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static boolean contains(String element, String[] array) { return indexOf(element, array) != -1; }
/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link String#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static boolean contains(String element, String[] array) { return indexOf(element, array) != -1; }
/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link String#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static boolean contains(String element, String[] array) { return indexOf(element, array) != -1; }
/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link Object#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static <T> boolean contains(T element, T[] array) { return indexOf(element, array) != -1; }
/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link Object#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static <T> boolean contains(T element, T[] array) { return indexOf(element, array) != -1; }
/** * Returns <jk>true</jk> if the specified array contains the specified element using the {@link Object#equals(Object)} * method. * * @param element The element to check for. * @param array The array to check. * @return * <jk>true</jk> if the specified array contains the specified element, * <jk>false</jk> if the array or element is <jk>null</jk>. */ public static <T> boolean contains(T element, T[] array) { return indexOf(element, array) != -1; }