code: void setClosedPath(int path, boolean b_yes_no) {
  		if (isClosedPath(path) == b_yes_no)
  			return;
  		if (getPathSize(path) > 0) {
  			int first = getFirstVertex(path);
  			int last = getLastVertex(path);
  			if (b_yes_no) {
  				// make a circular list
  				setNextVertex_(last, first);
  				setPrevVertex_(first, last);
  				// set segment to NULL (just in case)
  				int vindex = getVertexIndex(last);
  				setSegmentToIndex_(vindex, null);
  			} else {
  				setNextVertex_(last, -1);
  				setPrevVertex_(first, -1);
  				int vindex = getVertexIndex(last);
  				setSegmentToIndex_(vindex, null);
  			}
  		}
  
  		int oldflags = getPathFlags_(path);
  		int flags = (oldflags | (int) PathFlags_.closedPath)
  				- (int) PathFlags_.closedPath;// clear the bit;
  		setPathFlags_(path, flags
  				| (b_yes_no ? (int) PathFlags_.closedPath : 0));
  	}
docs: always succeeds