docs: @SuppressWarnings( "unchecked" )
  	public static final <E> E cast(String value, Type type){
  		//--Get Type
  		Class <?> clazz = null;
  		if(type instanceof Class){
  			clazz = (Class <?>) type;
  		}else if(type instanceof ParameterizedType){
  			ParameterizedType pt = (ParameterizedType) type;
  			clazz = (Class <?>) pt.getRawType();
  		}else{
  			clazz = type2class(type);
  			throw new IllegalArgumentException("Cannot cast to type (unhandled type): " + type);
  		}
  		//--Cast
  		if(clazz.isAssignableFrom(String.class)){
  			// (case: String)
  			return (E) value;
  		}else if(Boolean.class.isAssignableFrom(clazz) || boolean.class.isAssignableFrom(clazz)){
  			//(case: boolean)
  			if(value.equals("1")){ return (E) new Boolean(true); }
  			return (E) new Boolean( Boolean.parseBoolean(value) );
  		}else if(Integer.class.isAssignableFrom(clazz) || int.class.isAssignableFrom(clazz)){
  			//(case: integer)
  			return (E) new Integer(Integer.parseInt(value));
  		}else if(Long.class.isAssignableFrom(clazz) || long.class.isAssignableFrom(clazz)){
  			//(case: long)
  			return (E) new Long(Long.parseLong(value));
  		}else if(Float.class.isAssignableFrom(clazz) || float.class.isAssignableFrom(clazz)){
  			//(case: float)
  			if(value == null){ return (E) new Float(Float.NaN); }
  			return (E) new Float(Float.parseFloat(value));
  		}else if(Double.class.isAssignableFrom(clazz) || double.class.isAssignableFrom(clazz)){
  			//(case: double)
  			if(value == null){ return (E) new Double(Double.NaN); }
  			return (E) new Double(Double.parseDouble(value));
  		}else if(Short.class.isAssignableFrom(clazz) || short.class.isAssignableFrom(clazz)){
  			//(case: short)
  			return (E) new Short(Short.parseShort(value));
  		}else if(Byte.class.isAssignableFrom(clazz) || byte.class.isAssignableFrom(clazz)){
  			//(case: byte)
  			return (E) new Byte(Byte.parseByte(value));
  		}else if(Character.class.isAssignableFrom(clazz) || char.class.isAssignableFrom(clazz)){
  			//(case: char)
  			return (E) new Character((char) Integer.parseInt(value));
  		}else if(java.util.Date.class.isAssignableFrom(clazz)){
  			//(case: date)
  			try {
  				return (E) new Date(Long.parseLong(value));
  			} catch (NumberFormatException e) {
  				return null;
  			}
  		}else if(clazz.isArray()){
  			if(value == null){ return null; }
  			Class <?> subType = clazz.getComponentType();
  			// (case: array)
  			String[] strings = decodeArray(value);
  			Object[] array = (Object[]) Array.newInstance(clazz.getComponentType(), strings.length);
  			for(int i=0; i<strings.length; i++){
  				array[i] = cast(strings[i], subType);
  			}
  			return (E) array;
  		} else if(clazz.isEnum()){
  			// (case: enumeration)
  			Class c = (Class) clazz;
  			if(value == null){ return null; }
  			return (E) Enum.valueOf(c, value);
  		} else {
  			return null;
  		}
  	}