Unsynchronized. Get the next entry in the list.

@return the next entry in the list
16280
public Entry getNext()
  {
    checkEntryParent();
    
    Entry entry = null;
    
    if(!isLast())
    {
      entry = next;
    }

    return entry;
  }
1195001
protected ResultQueueEntry<FlatRow> getNext() throws IOException {
    ResultQueueEntry<FlatRow> queueEntry;
    try {
      queueEntry = resultQueue.take();
      // Should never happen
      if (queueEntry == null) {
        throw new IllegalStateException("Timed out awaiting next sync rows");
      }
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new IOException("Interrupted while waiting for next result", e);
    }

    return queueEntry;
  }
1301849
public synchronized Entry getPreviousEntry()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "getPreviousEntry");
    
    checkEntryParent();
    
    Entry previousEntry = null;
    
    synchronized(parentList)
    {            
      if(atBottom)
      {
        //if at the bottom of the list, return the last entry in the list
        previousEntry = parentList.last;
      }
      else if(!atTop)                        
      {
        //otherwise it's just the previous entry in the list
        previousEntry = current.getPrevious();                        
      }
      //if the cursor is at the top of the list then we should
      //just drop through and the previous entry is null
    }    
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "getPreviousEntry", previousEntry);

    return previousEntry;
  }
827197
@Override
    public Sequence<T> next() {
        Sequence<T> sequence = new Sequence<>();
        int[] visitedHops = new int[walkLength];
        Arrays.fill(visitedHops, -1);

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

            Vertex<T> vertex = sourceGraph.getVertex(startPosition);

            int currentPosition = startPosition;

            sequence.addElement(vertex.getValue());
            visitedHops[i] = vertex.vertexID();
            int cSpread = 0;

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

            switch (walkDirection) {
                case RANDOM:
                case FORWARD_ONLY:
                case FORWARD_UNIQUE:
                case FORWARD_PREFERRED: {

                    // ArrayUtils.removeElements(sourceGraph.getConnectedVertexIndices(order[currentPosition]), visitedHops);
                    int[] connections = ArrayUtils.removeElements(
                                    sourceGraph.getConnectedVertexIndices(vertex.vertexID()), visitedHops);

                    // we get  popularity of each node connected to the current node.
                    PriorityQueue<Node<T>> queue = new PriorityQueue<>(Math.max(10, connections.length), new NodeComparator());

                    int start = 0;
                    int stop = 0;
                    int cnt = 0;
                    if (connections.length > 0) {


                        for (int connected : connections) {
                            Node<T> tNode = new Node<>(connected, sourceGraph.getConnectedVertices(connected).size());
                            queue.add(tNode);
                        }


                        cSpread = spread > connections.length ? connections.length : spread;

                        switch (popularityMode) {
                            case MAXIMUM:
                                start = 0;
                                stop = start + cSpread - 1;
                                break;
                            case MINIMUM:
                                start = connections.length - cSpread;
                                stop = connections.length - 1;
                                break;
                            case AVERAGE:
                                int mid = connections.length / 2;
                                start = mid - (cSpread / 2);
                                stop = mid + (cSpread / 2);
                                break;
                        }

                        // logger.info("Spread: ["+ cSpread+ "], Connections: ["+ connections.length+"], Start: ["+start+"], Stop: ["+stop+"]");
                        cnt = 0;
                        //logger.info("Queue: " + queue);
                        //logger.info("Queue size: " + queue.size());

                        List<Node<T>> list = new ArrayList<>();
                        double[] weights = new double[cSpread];

                        int fcnt = 0;
                        while (!queue.isEmpty()) {
                            Node<T> node = queue.poll();
                            if (cnt >= start && cnt <= stop) {
                                list.add(node);
                                weights[fcnt] = node.getWeight();
                                fcnt++;
                            }
                            connections[cnt] = node.getVertexId();

                            cnt++;
                        }


                        int con = -1;

                        switch (spectrum) {
                            case PLAIN: {
                                con = RandomUtils.nextInt(start, stop + 1);

                                //    logger.info("Picked selection: " + con);

                                Vertex<T> nV = sourceGraph.getVertex(connections[con]);
                                startPosition = nV.vertexID();
                                lastId = vertex.vertexID();
                            }
                                break;
                            case PROPORTIONAL: {
                                double norm[] = MathArrays.normalizeArray(weights, 1);
                                double prob = rng.nextDouble();
                                double floor = 0.0;
                                for (int b = 0; b < weights.length; b++) {
                                    if (prob >= floor && prob < floor + norm[b]) {
                                        startPosition = list.get(b).getVertexId();
                                        lastId = startPosition;
                                        break;
                                    } else {
                                        floor += norm[b];
                                    }
                                }
                            }
                                break;
                        }

                    } else {
                        switch (noEdgeHandling) {
                            case EXCEPTION_ON_DISCONNECTED:
                                throw new NoEdgesException("No more edges at vertex [" + currentPosition + "]");
                            case CUTOFF_ON_DISCONNECTED:
                                i += walkLength;
                                break;
                            case SELF_LOOP_ON_DISCONNECTED:
                                startPosition = currentPosition;
                                break;
                            case RESTART_ON_DISCONNECTED:
                                startPosition = startPoint;
                                break;
                            default:
                                throw new UnsupportedOperationException(
                                                "Unsupported noEdgeHandling: [" + noEdgeHandling + "]");
                        }
                    }
                }
                    break;
                default:
                    throw new UnsupportedOperationException("Unknown WalkDirection: [" + walkDirection + "]");
            }

        }

        return sequence;
    }
1167337
public T getNext() throws IOException {
    try {
      return mapper.readValue(jsonParser, clazz);
    } catch (EOFException e) {
      return null;
    }
  }
1183753
@Override
  public Iterator<Entry<String, Fetch>> iterator() {
    return Collections.unmodifiableMap(attrFetchMap).entrySet().iterator();
  }
1012542
@Override
  public Iterator<T> iterator() {
    return new Iterator<T>() {

      /** The index of the next item. */
      private int next = ArrayQueue.this.next;

      /* (non-Javadoc)
       * @see java.util.Iterator#hasNext()
       */
      public boolean hasNext() {
        return next < items.length;
      }

      /* (non-Javadoc)
       * @see java.util.Iterator#next()
       */
      public T next() {
        if (next >= items.length) {
          throw new NoSuchElementException();
        }
        return items[next++];
      }

      /* (non-Javadoc)
       * @see java.util.Iterator#remove()
       */
      public void remove() {
        throw new UnsupportedOperationException();
      }

    };
  }
609091
public Object getNextData()
    {
        if (m_iCurrentIndex >= m_vector.size())
            m_iCurrentIndex = -1;
        if (m_iCurrentIndex == -1)
            return DATA_EOF;  // EOF
        return m_vector.elementAt(m_iCurrentIndex++);
    }
396528
public synchronized Entry next()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "next");

    // can only do anything if the cursor is still pointing in to a list
    checkEntryParent();
    
    Entry nextEntry = null;
    
    synchronized(parentList)
    {
      //get the next entry in the list
      nextEntry = getNextEntry();
      //if the next entry is null
      if(nextEntry == null)
      {
        //then hopefully we're at the end of the list
        if(current == parentList.last)
        {
          //so move the cursor to the bottom of the list,
          //not pointing to any actual entry
          moveToBottom();
        }
        else if(!atBottom)                   
        {
          //it should not be possible for the next entry to be null but the current
          //not be the last one in the list or already at the bottom
          SIErrorException e = new SIErrorException(
            nls.getFormattedMessage(
              "INTERNAL_MESSAGING_ERROR_CWSIP0001",
              new Object[] { "Cursor", "1:160:1.15" },
              null));
    
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.utils.linkedlist.Cursor.next",
            "1:166:1.15",
            this);
      
          SibTr.exception(tc, e);      
    
          if (tc.isEntryEnabled())
            SibTr.exit(tc, "next", e);
    
          throw e;
        }
      }
      else
      {
        //move the cursor to the next entry
        moveCursor(nextEntry);
      }
    }
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "next", nextEntry);

    return nextEntry;
  }
897342
public int[] next()
    {
        boolean hasNewPerm = false;

        escape:while( level >= 0) {
//            boolean foundZero = false;
            for( int i = iter[level]; i < data.length; i = iter[level] ) {
                iter[level]++;

                if( data[i] == -1 ) {
                    level++;
                    data[i] = level-1;

                    if( level >= data.length ) {
                        // a new permutation has been created return the results.
                        hasNewPerm = true;
                        System.arraycopy(data,0,ret,0,ret.length);
                        level = level-1;
                        data[i] = -1;
                        break escape;
                    } else {
                        valk[level] = i;
                    }
                }
            }

            data[valk[level]] = -1;
            iter[level] = 0;
            level = level-1;

        }

        if( hasNewPerm )
            return ret;
        return null;
    }
135238
public LinkedList<byte[]> getUnsentPackets() {
		LinkedList<byte[]> list = new LinkedList<>();
		ByteBuffer buffer = queue.poll();
		while (buffer != null) {
			list.addLast(buffer.array());
			buffer = queue.poll();
		}
		return list;
	}
901472
public TarEntry getNextEntry() throws IOException {
		closeCurrentEntry();

		byte[] header = new byte[TarConstants.HEADER_BLOCK];
		byte[] theader = new byte[TarConstants.HEADER_BLOCK];
		int tr = 0;

		// Read full header
		while (tr < TarConstants.HEADER_BLOCK) {
			int res = read(theader, 0, TarConstants.HEADER_BLOCK - tr);

			if (res < 0) {
				break;
			}

			System.arraycopy(theader, 0, header, tr, res);
			tr += res;
		}

		// Check if record is null
		boolean eof = true;
		for (byte b : header) {
			if (b != 0) {
				eof = false;
				break;
			}
		}

		if (!eof) {
			currentEntry = new TarEntry(header);
		}

		return currentEntry;
	}
543254
public String next() {
        if (entry == null) return null;
        entry = entry.next;
        return entry.element;
    }
900958
protected Runnable getNextRunnable() throws InterruptedException {

        Runnable toRun = null;

        // Wait for new Runnable (see runInThread()) and notify runInThread()
        // in case the next Runnable is already waiting.
        synchronized (m_nextRunnableLock) {
            if (m_nextRunnable == null) {
                m_nextRunnableLock.wait(1000);
            }

            if (m_nextRunnable != null) {
                toRun = m_nextRunnable;
                m_nextRunnable = null;
                m_nextRunnableLock.notifyAll();
            }
        }

        return toRun;
    }
1199355
public Tuple getNextUnused()
    {
    Iterator<Tuple> unused = getUnused();
    return
      unused.hasNext()
      ? unused.next()
      : null;
    }
141730
public Object next()
  {
    if(_currentSubIterator == null || !_currentSubIterator.hasNext())
    {
      nextQueue();
    }
    
    Object nextRemoteQueue = null;

    if(_currentSubIterator != null)
    {
      nextRemoteQueue = _currentSubIterator.next(); 
    }

    return nextRemoteQueue;        
  }
1356711
public Entry<T>[] entries() {
        @SuppressWarnings("unchecked")
        Entry<T>[] entries = new Entry[size];
        int idx = 0;
        for (Entry entry : table) {
            while (entry != null) {
                entries[idx++] = entry;
                entry = entry.next;
            }
        }
        return entries;
    }