List of utility methods to do Array Has
boolean | arrayHas(int[] arr, int val) Helper method to check if an int array contains an int. for (int element : arr) if (element == val) return true; return false; |
boolean | arrayHasContent(Object[] array) Helper method to determine whether an array has any content. if (array != null) { for (int i = 0; i < array.length; ++i) { if (array[i] != null) { return true; return false; ... |
boolean | arrayHasContiguousRowEntries(double[] aVector) Test a vector to see if there is a block of contiguous nonzero values present. int nnz = numberOfNonZeroElementsInVector(aVector); if (nnz == 0) { return true; if (nnz == 1) { return true; int dataStartsAt = 0; ... |
boolean | arrayHasElements(Object[] obj) array Has Elements if (obj != null && obj.length != 0) { for (Object object : obj) { if (object != null) { return true; return false; ... |
boolean | arrayHasTaints(int[] a) array Has Taints for (int i : a) if (i != 0) return true; return false; |
boolean | inArray(byte needle, byte[] haystack) in Array for (byte item : haystack) { if (item == needle) { return true; return false; |
boolean | inArray(byte needle, byte[] haystack) in Array for (byte item : haystack) { if (item == needle) { return true; return false; |
boolean | inArray(char[] array, char c) in Array char[] arr$ = array; int len$ = array.length; for (int i$ = 0; i$ < len$; ++i$) { char ch = arr$[i$]; if (ch == c) { return true; return false; |
boolean | inArray(final String s, final String[] array) in Array for (String item : array) { if (item != null && item.equals(s)) { return true; return false; |
boolean | inArray(final T[] array, final U search) Check whether the given array contains the given search object. for (final T element : array) if (search.equals(element)) return true; return false; |