docs: @SuppressWarnings({ "unchecked", "rawtypes" })
  	@Pure
  	protected GP newPath(PT startPoint, ST segment) {
  		if (this.pathFactory != null) {
  			return this.pathFactory.newPath(startPoint, segment);
  		}
  		try {
  			return (GP) new GraphPath(segment, startPoint);
  		} catch (Throwable e) {
  			throw new IllegalStateException(Locale.getString("E2"), e); //$NON-NLS-1$
  		}
  	}