code: @SuppressWarnings("checkstyle:nestedifdepth")
  	protected final List<GraphIterationElement<ST, PT>> getNextSegments(boolean avoid_visited_segments,
  			GraphIterationElement<ST, PT> element) {
  		assert this.allowManyReplies || this.visited != null;
  		if (element != null) {
  			final ST segment = element.getSegment();
  			final PT point = element.getPoint();
  			if ((segment != null) && (point != null)) {
  				final PT pts = segment.getOtherSidePoint(point);
  				if (pts != null) {
  					final double distanceToReach = element.getDistanceToReachSegment() + segment.getLength();
  					GraphIterationElement<ST, PT> candidate;
  					final double restToConsume = element.distanceToConsume - segment.getLength();
  					final List<GraphIterationElement<ST, PT>> list = new ArrayList<>();
  					for (final ST theSegment : pts.getConnectedSegmentsStartingFrom(segment)) {
  						if (!theSegment.equals(segment)) {
  							candidate = newIterationElement(
  									segment, theSegment,
  									pts,
  									distanceToReach,
  									restToConsume);
  							if ((this.allowManyReplies)
  									|| (!avoid_visited_segments)
  									|| (!this.visited.contains(candidate))) {
  								list.add(candidate);
  							}
  						}
  					}
  
  					return list;
  				}
  			}
  		}
  		throw new NoSuchElementException();
  	}
docs: Replies the next segments.
  
  @param avoid_visited_segments is <code>true</code> to avoid to reply already visited segments, otherwise <code>false</code>
  @param element is the element from which the next segments must be replied.
  @return the list of the following segments
  @see #next()