List of utility methods to do Array Has
boolean | inArray(int[] arr, int search) in Array if (arr != null) { for (int i = 0; i < arr.length; i++) { if (arr[i] == search) { return true; return false; ... |
boolean | inArray(int[] array, int needle) in Array boolean found = false; for (int i = 0; i < array.length; i++) { if (array[i] == needle) { found = true; break; return found; ... |
boolean | inArray(Object[] ps, Object p) in Array if (ps == null) return false; for (int i = 0; i < ps.length; i++) { if (ps[i] == p) return true; if (ps[i].equals(p)) return true; return false; |
boolean | inArray(String arg, String[] array) check if a string is in an array of strings, checking all elements int i, len; boolean res = false; len = array.length; if (len > 0) for (i = 0; i < len; i++) { if (arg.equals(array[i])) res = true; return res; |
boolean | inArray(String needle, String... haystack) Test, if a string occur in an array for (String string : haystack) { if (string.equals(needle)) return true; return false; |
boolean | inArray(String str, String[] stringArray) in Array return inArray(str, stringArray, false);
|
boolean | inArray(String string, String[] strings) in Array if (string == null) { return false; for (String s : strings) { if (s != null && s.equalsIgnoreCase(string)) { return true; return false; |
int | inArray(String value, String[] s) in Array if (s != null && value != null) { for (int i = 0; i < s.length; i++) { if (value.equals(s[i])) { return i; return -1; ... |
boolean | inArray(String value, String[] values) in Array if (value != null && values != null) { for (String v : values) { if (value.equals(v)) { return true; return false; ... |
boolean | inArray(String[] attributes, String attribute) in Array if (indexOf(attributes, attribute) >= 0) { return true; return false; |