code: protected static final Collection<?> objectToCollection(Object object) {
  		Collection<?> collection = null;
  		if (object != null) {
  			if (object instanceof Collection) {
  				collection = (Collection<?>) object;
  			} else if (object instanceof Map) {
  				collection = ((Map<?, ?>) object).values();
  			} else if (object.getClass().isArray()) {
  				LinkedList<Object> list = new LinkedList<Object>();
  				int len = Array.getLength(object);
  				for (int i = 0; i < len; i++) {
  					list.addLast(Array.get(object, i));
  				}
  				collection = list;
  			} else {
  				collection = Collections.singleton(object);
  			}
  		}
  		return collection;
  	}
docs: --- OBJECT TO COLLECTION CONVERTER ---