code: @Pure
  	public static AbstractPathElement3F newInstance(PathElementType type, double lastX, double lastY, double lastZ, double[] coords) {
  		switch(type) {
  		case MOVE_TO:
  			return new MovePathElement3f(coords[0], coords[1], coords[2]);
  		case LINE_TO:
  			return new LinePathElement3f(lastX, lastY, lastZ, coords[0], coords[1], coords[2]);
  		case QUAD_TO:
  			return new QuadPathElement3f(lastX, lastY, lastZ, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
  		case CURVE_TO:
  			return new CurvePathElement3f(lastX, lastY, lastZ, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8]);
  		case CLOSE:
  			return new ClosePathElement3f(lastX, lastY, lastZ, coords[0], coords[1], coords[2]);
  		default:
  		}
  		throw new IllegalArgumentException();
  	}
docs: Create an instance of path element.
  
  @param type is the type of the new element.
  @param lastX is the coordinate of the last point.
  @param lastY is the coordinate of the last point.
  @param lastZ is the coordinate of the last point.
  @param coords are the coordinates.
  @return the instance of path element.