code: protected int[] indicesOf(final Object itemSet) {
  		int[] ret = null;
  
  		if (itemSet instanceof Collection) {
  			Collection collection = (Collection) itemSet;
  			ret = new int[collection.size()];
  			int i = 0;
  			for (Iterator iter = collection.iterator(); iter.hasNext(); i++) {
  				ret[i] = indexOf(iter.next());
  			}
  		}
  		else if (itemSet == null) {
  			ret = new int[0];
  		}
  		else if (itemSet.getClass().isArray()) {
  			Object[] items = (Object[]) itemSet;
  			ret = new int[items.length];
  			for (int i = 0; i < items.length; i++) {
  				ret[i] = indexOf(items[i]);
  			}
  		}
  		else {
  			throw new IllegalArgumentException("itemSet must be eithe an Array or a Collection");
  		}
  
  		return ret;
  	}
docs: Return an array of indices in the selectableItems for each element in the
  provided set. The set can be either a Collection or an Array.
  
  @param itemSet Either an array or a Collection of items
  @return array of indices of the elements in itemSet within the
  selectableItems