Add the next interceptor to this chain.

@param next Next interceptor to add.

@return A new interceptor chain with the interceptors currently existing and the passed interceptor added to the
end.
770258
public HttpServerInterceptorChain<I, O, II, OO> next(final Interceptor<II, OO> next) {
        return new HttpServerInterceptorChain<>(new TransformingInterceptor<I, O, II, OO>() {
            @Override
            public RequestHandler<I, O> intercept(RequestHandler<II, OO> handler) {
                return interceptor.intercept(next.intercept(handler));
            }
        });
    }
1065478
@Override
    public Sequence<T> next() {
        int[] visitedHops = new int[walkLength];
        Arrays.fill(visitedHops, -1);

        Sequence<T> sequence = new Sequence<>();

        int startPosition = position.getAndIncrement();
        int lastId = -1;
        int startPoint = order[startPosition];
        //System.out.println("");


        startPosition = startPoint;

        //if (startPosition == 0 || startPoint % 1000 == 0)
        //   System.out.println("ATZ Walk: ");

        for (int i = 0; i < walkLength; i++) {
            Vertex<T> vertex = sourceGraph.getVertex(startPosition);

            int currentPosition = startPosition;

            sequence.addElement(vertex.getValue());
            visitedHops[i] = vertex.vertexID();
            //if (startPoint == 0 || startPoint % 1000 == 0)
            // System.out.print("" + vertex.vertexID() + " -> ");


            if (alpha > 0 && lastId != startPoint && lastId != -1 && alpha > rng.nextDouble()) {
                startPosition = startPoint;
                continue;
            }


            // get next vertex
            switch (walkDirection) {
                case RANDOM: {
                    int[] nextHops = sourceGraph.getConnectedVertexIndices(currentPosition);
                    startPosition = nextHops[rng.nextInt(nextHops.length)];
                }
                    break;
                case FORWARD_ONLY: {
                    // here we remove only last hop
                    int[] nextHops = ArrayUtils.removeElements(sourceGraph.getConnectedVertexIndices(currentPosition),
                                    lastId);
                    if (nextHops.length > 0) {
                        startPosition = nextHops[rng.nextInt(nextHops.length)];
                    } else {
                        switch (noEdgeHandling) {
                            case CUTOFF_ON_DISCONNECTED: {
                                i += walkLength;
                            }
                                break;
                            case EXCEPTION_ON_DISCONNECTED: {
                                throw new NoEdgesException("No more edges at vertex [" + currentPosition + "]");
                            }
                            case SELF_LOOP_ON_DISCONNECTED: {
                                startPosition = currentPosition;
                            }
                                break;
                            case PADDING_ON_DISCONNECTED: {
                                throw new UnsupportedOperationException("PADDING not implemented yet");
                            }
                            case RESTART_ON_DISCONNECTED: {
                                startPosition = startPoint;
                            }
                                break;
                            default:
                                throw new UnsupportedOperationException(
                                                "NoEdgeHandling mode [" + noEdgeHandling + "] not implemented yet.");
                        }
                    }
                }
                    break;
                case FORWARD_UNIQUE: {
                    // here we remove all previously visited hops, and we don't get  back to them ever
                    int[] nextHops = ArrayUtils.removeElements(sourceGraph.getConnectedVertexIndices(currentPosition),
                                    visitedHops);
                    if (nextHops.length > 0) {
                        startPosition = nextHops[rng.nextInt(nextHops.length)];
                    } else {
                        // if we don't have any more unique hops within this path - break out.
                        switch (noEdgeHandling) {
                            case CUTOFF_ON_DISCONNECTED: {
                                i += walkLength;
                            }
                                break;
                            case EXCEPTION_ON_DISCONNECTED: {
                                throw new NoEdgesException("No more edges at vertex [" + currentPosition + "]");
                            }
                            case SELF_LOOP_ON_DISCONNECTED: {
                                startPosition = currentPosition;
                            }
                                break;
                            case PADDING_ON_DISCONNECTED: {
                                throw new UnsupportedOperationException("PADDING not implemented yet");
                            }
                            case RESTART_ON_DISCONNECTED: {
                                startPosition = startPoint;
                            }
                                break;
                            default:
                                throw new UnsupportedOperationException(
                                                "NoEdgeHandling mode [" + noEdgeHandling + "] not implemented yet.");
                        }
                    }
                }
                    break;
                case FORWARD_PREFERRED: {
                    // here we remove all previously visited hops, and if there's no next unique hop available - we fallback to anything, but the last one
                    int[] nextHops = ArrayUtils.removeElements(sourceGraph.getConnectedVertexIndices(currentPosition),
                                    visitedHops);
                    if (nextHops.length == 0) {
                        nextHops = ArrayUtils.removeElements(sourceGraph.getConnectedVertexIndices(currentPosition),
                                        lastId);
                        if (nextHops.length == 0) {
                            switch (noEdgeHandling) {
                                case CUTOFF_ON_DISCONNECTED: {
                                    i += walkLength;
                                }
                                    break;
                                case EXCEPTION_ON_DISCONNECTED: {
                                    throw new NoEdgesException("No more edges at vertex [" + currentPosition + "]");
                                }
                                case SELF_LOOP_ON_DISCONNECTED: {
                                    startPosition = currentPosition;
                                }
                                    break;
                                case PADDING_ON_DISCONNECTED: {
                                    throw new UnsupportedOperationException("PADDING not implemented yet");
                                }
                                case RESTART_ON_DISCONNECTED: {
                                    startPosition = startPoint;
                                }
                                    break;
                                default:
                                    throw new UnsupportedOperationException("NoEdgeHandling mode [" + noEdgeHandling
                                                    + "] not implemented yet.");
                            }
                        } else
                            startPosition = nextHops[rng.nextInt(nextHops.length)];
                    }
                }
                    break;
                default:
                    throw new UnsupportedOperationException("Unknown WalkDirection [" + walkDirection + "]");
            }

            lastId = vertex.vertexID();
        }

        //if (startPoint == 0 || startPoint % 1000 == 0)
        //System.out.println("");
        return sequence;
    }
460468
public static <T, R> Function<T, R> intercept(Function<T, R> innermost, Interceptor<T> interceptor) {
        dbc.precondition(interceptor != null, "cannot create an interceptor chain with a null interceptor");
        return new InterceptorChain<>(innermost, new SingletonIterator<Interceptor<T>>(interceptor));
    }
1333389
public Interceptors<Beans<T>> getOrCreateInterceptors()
   {
      List<Node> nodeList = childNode.get("interceptors");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new InterceptorsImpl<Beans<T>>(this, "interceptors", childNode, nodeList.get(0));
      }
      return createInterceptors();
   }
852398
public synchronized Object next()
    {
        if (position < scrolled)
        {
            position++;
            return elements.get(position - 1);
        }
        else
        {
            Object next = ojbIterator.next();
            elements.add(next);
            position++;
            scrolled++;
            return next;
        }
    }
274306
public Object next()
	{
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "next");
    } 
    
    Object result;
		if (msgIterator.hasNext())
		{
      Long valueStamp = (Long) msgIterator.next();
      
			result = new TransmitMessageRequest(valueStamp.longValue(), aoStream.itemStream, aoStream, messageProcessor, aoh.getDestinationHandler());
		}
		else
		{
			result = null;
		}
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.exit(tc, "next", result);
    } 
    return result;
	}
934063
public Event nextEvent() {
    if (ei == events.length) {
      addNewEvents();
      ei = 0;
    }
    return ((Event) events[ei++]);
  }
768683
@Override
    public Sequence<T> next() {
        Sequence<T> sequence = new Sequence<>();

        int startPosition = position.getAndIncrement();
        int lastId = -1;
        int currentPoint = order[startPosition];
        int startPoint = currentPoint;
        for (int i = 0; i < walkLength; i++) {

            if (alpha > 0 && lastId != startPoint && lastId != -1 && alpha > rng.nextDouble()) {
                startPosition = startPoint;
                continue;
            }


            Vertex<T> vertex = sourceGraph.getVertex(currentPoint);
            sequence.addElement(vertex.getValue());

            List<? extends Edge<? extends Number>> edges = sourceGraph.getEdgesOut(currentPoint);

            if (edges == null || edges.isEmpty()) {
                switch (noEdgeHandling) {
                    case CUTOFF_ON_DISCONNECTED:
                        // we just break this sequence
                        i = walkLength;
                        break;
                    case EXCEPTION_ON_DISCONNECTED:
                        throw new NoEdgesException("No available edges left");
                    case PADDING_ON_DISCONNECTED:
                        // TODO: implement padding
                        throw new UnsupportedOperationException("Padding isn't implemented yet");
                    case RESTART_ON_DISCONNECTED:
                        currentPoint = order[startPosition];
                        break;
                    case SELF_LOOP_ON_DISCONNECTED:
                        // we pad walk with this vertex, to do that - we just don't do anything, and currentPoint will be the same till the end of walk
                        break;
                }
            } else {
                double totalWeight = 0.0;
                for (Edge<? extends Number> edge : edges) {
                    totalWeight += edge.getValue().doubleValue();
                }

                double d = rng.nextDouble();
                double threshold = d * totalWeight;
                double sumWeight = 0.0;
                for (Edge<? extends Number> edge : edges) {
                    sumWeight += edge.getValue().doubleValue();
                    if (sumWeight >= threshold) {
                        if (edge.isDirected()) {
                            currentPoint = edge.getTo();
                        } else {
                            if (edge.getFrom() == currentPoint) {
                                currentPoint = edge.getTo();
                            } else {
                                currentPoint = edge.getFrom(); //Undirected edge: might be next--currVertexIdx instead of currVertexIdx--next
                            }
                        }
                        lastId = currentPoint;
                        break;
                    }
                }
            }
        }

        return sequence;
    }
1371176
@Override
    public java.util.concurrent.Future<ListSubscriptionsResult> listSubscriptionsAsync(String nextToken) {

        return listSubscriptionsAsync(new ListSubscriptionsRequest().withNextToken(nextToken));
    }
1060494
protected boolean addNextItem() {

        // this method is so complicated because to add the next item,
        // you may need to skip to another group and create the corresponding widget

        if (m_model.isEmpty()) {
            return false;
        }
        // now we know there is at least one group
        if (m_currentGroupPanel == null) {
            // this case happens if the method is called for the first time
            m_currentGroupPanel = addGroupPanel(m_model.getGroups().get(0), 0);
        }
        while (true) {
            if (m_currentGroupPanel.hasMoreItems()) {
                // found next item in the current group
                boolean found = m_currentGroupPanel.addNextItem();
                if (found) {
                    m_scrollPanel.onResizeDescendant();
                    return true;
                }
            } else if (m_currentGroupIndex < (m_model.getGroups().size() - 1)) {
                // didn't find item in the current group, so skip to next group if available
                // and create the group widget
                m_currentGroupIndex += 1;
                m_currentGroupPanel = addGroupPanel(m_model.getGroups().get(m_currentGroupIndex), m_currentGroupIndex);
            } else {
                // all groups exhausted
                m_scrollPanel.onResizeDescendant();
                return false;
            }
        }
    }
1054179
public Feature nextFeature() {
	Feature f = (Feature)currentFeatures.get(currentFeatureIdx);
	currentFeatureIdx++;
	return f;
    }
32325
@Override
  public Node next() {
    Node cur = next;
    next = next.getNextSibling();
    return cur;
  }
283494
public Interceptors add(Interceptor globalActionInterceptor) {
		if (globalActionInterceptor == null) {
			throw new IllegalArgumentException("globalActionInterceptor can not be null.");
		}
		InterceptorManager.me().addGlobalActionInterceptor(globalActionInterceptor);
		return this;
	}
195542
@Override
    public void prepare ( CommonServerMessageBlockRequest next ) {
        CommonServerMessageBlockResponse n = getNextResponse();
        if ( n != null ) {
            n.prepare(next);
        }
    }
24294
public HttpClientBuilder interceptor(ClientHttpRequestInterceptor interceptor) {
        if (endpoint.getEndpointConfiguration().getClientInterceptors() == null) {
            endpoint.getEndpointConfiguration().setClientInterceptors(new ArrayList<ClientHttpRequestInterceptor>());
        }

        endpoint.getEndpointConfiguration().getClientInterceptors().add(interceptor);
        return this;
    }
1014112
public void addChildAfter(Node newChild, Node node) {
        if (newChild.next != null)
            throw new RuntimeException(
                      "newChild had siblings in addChildAfter");
        newChild.next = node.next;
        node.next = newChild;
        if (last == node)
            last = newChild;
    }
449923
public WxMpMessageRouterRule interceptor(WxMpMessageInterceptor interceptor, WxMpMessageInterceptor... otherInterceptors) {
    this.interceptors.add(interceptor);
    if (otherInterceptors != null && otherInterceptors.length > 0) {
      for (WxMpMessageInterceptor i : otherInterceptors) {
        this.interceptors.add(i);
      }
    }
    return this;
  }