code: public void setPath(List<? extends S> path, Direction1D direction) {
  		this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
  		this.firstSegmentDirection = detectFirstSegmentDirection(direction);
  	}
docs: Set the path used by this transformation.
  
  @param path is the new path
  @param direction is the direction to follow on the path if the path contains only one segment.