class CUtils {

	public static Object[] asArray(Object obj) {
		if(obj.getClass().isArray()){
			return (Object[]) obj;
		}else if(Collection.class.isAssignableFrom(obj.getClass())){
			Collection col = (Collection) obj;
			Object[] array = new Object[col.size()];
			int i = 0;
			for (Object o : col) {
				array[i++] = o;
			}
			return array;
		}else{
			return new Object[]{obj};
		}
	}

	private  CUtils();

}