Here you can find the source of inArray(String[] attributes, String attribute)
public static boolean inArray(String[] attributes, String attribute)
//package com.java2s; //License from project: Apache License public class Main { public static boolean inArray(String[] attributes, String attribute) { if (indexOf(attributes, attribute) >= 0) { return true; }/*from ww w . j av a 2 s . co m*/ return false; } public static int indexOf(String[] attributes, String attribute) { if (attributes != null) { for (int i = 0; i < attributes.length; i++) { if (attributes[i] != null && attributes[i].equals(attribute)) { return i; } } } return -1; } }