Here you can find the source of notInArray(PrintService key, PrintService[] array)
private static boolean notInArray(PrintService key, PrintService[] array)
//package com.java2s; import javax.print.PrintService; public class Main { private static boolean notInArray(PrintService key, PrintService[] array) { if (key == null) return false; int i = array.length; while (--i >= 0) if (array[i].equals(key)) return false; return true; }//from w w w. j a v a 2 s . co m }