Get the next tile to search for
@return -1 if not found
551921
private long next() {
        while(true) {
            final long index;
            synchronized (mTileAreas) {
                if(!mTileIndices.hasNext()) {
                    return -1;
                }
                index = mTileIndices.next();
            }
            final Drawable drawable = mCache.getMapTile(index);
            if (drawable == null) {
                return index;
            }
        }
    }
1139661
public String nextSearch() {
		if(!triedExact) {
			triedExact = true;
			return remainder + EXACT_SUFFIX;
		}
		if(!triedFull) {
			triedFull = true;
			if(remainder.endsWith(")/")) {
				choppedPath = true;
			}
			return remainder;
		}
		if(!choppedArgs) {
			choppedArgs = true;
			int argStart = remainder.indexOf('?');
			if(argStart != -1) {
				remainder = remainder.substring(0,argStart);
				return remainder;
			}
		}
		// we have already returned remainder as-is, so we have slightly
		// special handling here to make sure we continue to make progress:
		// (com,foo,www,)/         => (com,foo,www,
		// (com,foo,www,)/bar      => (com,foo,www,)/
		// (com,foo,www,)/bar/     => (com,foo,www,)/bar
		// (com,foo,www,)/bar/foo  => (com,foo,www,)/bar
		// (com,foo,www,)/bar/foo/ => (com,foo,www,)/bar/foo
		if(!choppedPath) {
			int lastSlash = remainder.lastIndexOf('/');
			if(lastSlash != -1) {
				if(lastSlash == (remainder.length()-1)) {
					if(remainder.endsWith(")/")) {
						String tmp = remainder;
						remainder = remainder.substring(0,lastSlash-1);
						choppedPath = true;
						return tmp;
					} else {
						remainder = remainder.substring(0,lastSlash);
						return remainder;
					}
				}
				if((lastSlash > 0) && remainder.charAt(lastSlash-1) == ')') {
					String tmp = remainder.substring(0,lastSlash+1);
					remainder = remainder.substring(0,lastSlash-1);
					return tmp;
				} else {
					remainder = remainder.substring(0,lastSlash);
					return remainder;
				}
			}
			choppedPath = true;
		}
		if(!choppedLogin) {
			choppedLogin = true;
			int lastAt = remainder.lastIndexOf('@');
			if(lastAt != -1) {
				String tmp = remainder;
				remainder = remainder.substring(0,lastAt);
				return tmp;
			}
		}
		if(!choppedPort) {
			choppedPort = true;
			int lastColon = remainder.lastIndexOf(':');
			if(lastColon != -1) {
				return remainder;
			}
		}
		// now just remove ','s
		int lastComma = remainder.lastIndexOf(',');
		if(lastComma == -1) {
			return null;
		}
		remainder = remainder.substring(0,lastComma);
		return remainder;
	}
443642
public boolean next() {
    if (sketchAccessor_ == null) { // initial setup
      sketchAccessor_ = DoublesSketchAccessor.wrap(sketch_);
    } else { // advance index within the current level
      i_++;
    }
    if (i_ < sketchAccessor_.numItems()) {
      return true;
    }
    // go to the next non-empty level
    do {
      level_++;
      if (level_ > 0) {
        bits_ >>>= 1;
      }
      if (bits_ == 0L) {
        return false; // run out of levels
      }
      weight_ *= 2;
    } while ((bits_ & 1L) == 0L);
    i_ = 0;
    sketchAccessor_.setLevel(level_);
    return true;
  }
273316
def next(self):
        
        if not self._cache:
            self._cache = self._get_results()
            self._retrieved += len(self._cache)

        # If we don't have any other data to return, we just
        # stop the iteration.
        if not self._cache:
            raise StopIteration()

        # Consuming the cache and updating the "cursor"
        return self._cache.pop(0)
1073130
private String getNeighborGroup(Tile tile, Tile neighbor)
    {
        final String neighborGroup;
        if (isTransition(neighbor))
        {
            if (isTransition(tile))
            {
                neighborGroup = getOtherGroup(tile, neighbor);
            }
            else
            {
                neighborGroup = null;
            }
        }
        else
        {
            neighborGroup = mapGroup.getGroup(neighbor);
        }
        return neighborGroup;
    }
907248
public boolean next() {
    if (combinedBuffer_ == null) { // initial setup
      combinedBuffer_ = sketch_.combinedBuffer_;
      num_ = sketch_.getBaseBufferCount();
    } else { // advance index within the current level
      i_++;
    }
    if (i_ < num_) {
      return true;
    }
    // go to the next non-empty level
    do {
      level_++;
      if (level_ > 0) {
        bits_ >>>= 1;
      }
      if (bits_ == 0L) {
        return false; // run out of levels
      }
      weight_ *= 2;
    } while ((bits_ & 1L) == 0L);
    i_ = 0;
    offset_ = (2 + level_) * sketch_.getK();
    num_ = sketch_.getK();
    return true;
  }
667534
protected int getNextNode()
  {
    if (m_foundLast)
      return DTM.NULL;

    int next = m_iterator.next();
    
    if (m_isFresh)
      m_isFresh = false;

    if (DTM.NULL == next)
      this.m_foundLast = true;

    return next;
  }
1282442
public T next() {
		if(cachedNext == null) {
			throw new NoSuchElementException("call hasNext first!");
		}
		T o = cachedNext;
		cachedNext = null;
		return o;
	}
935948
public Object next() {
        if ( this.entry != null ) {
            this.entry = this.entry.getNext();
        }

        // if no entry keep skipping rows until we come to the end, or find one that is populated
        while ( this.entry == null && this.row < this.length ){
            this.entry = this.table[this.row];
            this.row++;
        }

        return this.entry;
    }
403269
def next_match char
      start = @current_index
      start.upto(@list.length-1) do |ix|
        if @list[ix][0,1].casecmp(char) == 0
          return @list[ix] unless @list[ix] == @buffer
        end
        @current_index += 1
      end
      ## could not find, start from zero
      @current_index = 0
      start = [@list.length()-1, start].min
      0.upto(start) do |ix|
        if @list[ix][0,1].casecmp(char) == 0
          return @list[ix] unless @list[ix] == @buffer
        end
        @current_index += 1
      end
      @current_index = [@list.length()-1, @current_index].min
      return nil
    end
55902
protected int getNextNode()
  {
    if (null != m_exprObj)
    {
      m_lastFetched = m_exprObj.nextNode();
    }
    else
      m_lastFetched = DTM.NULL;

    return m_lastFetched;
  }
599734
def next(self):
        
        # do not acquire lock if NuMap is not finished.
        if self.finished:
            raise StopIteration
        # get per-tee lock
        self.piper.tee_locks[self.i].acquire()
        # get result or exception
        exception = True
        try:
            result = self.piper.tees[self.i].next()
            exception = False
        except StopIteration, result:
            self.finished = True
        except Exception, result:
            pass
        # release per-tee lock either self or next
        if self.s == self.stride or self.finished:
            self.s = 1
            self.piper.tee_locks[(self.i + 1) % len(self.piper.tees)].release()

        else:
            self.s += 1
            self.piper.tee_locks[self.i].release()
        if exception:
            raise result
        else:
            return result
329589
private static Tile searchForTile(MapTile map, ImageBuffer tileSprite, int x, int y)
    {
        // Check each tile on each sheet
        for (final Integer sheet : map.getSheets())
        {
            final Tile tile = checkTile(map, tileSprite, sheet, x, y);
            if (tile != null)
            {
                return tile;
            }
        }

        // No tile found
        return null;
    }
841479
protected boolean checkTileIndex (int tileIndex)
    {
        int tcount = getTileCount();
        if (tileIndex >= 0 && tileIndex < tcount) {
            return true;
        } else {
            log.warning("Requested invalid tile [tset=" + this + ", index=" + tileIndex + "].",
                        new Exception());
            return false;
        }
    }
720697
def next(self):
        
        if self._mode != "r":
            raise UnsupportedOperation("not available in 'w' mode")

        self._n += 1
        if self._n > self._nb_markers:
            raise StopIteration()

        return self._bim.index[self._n - 1], self._read_current_marker()
619712
@Override
    public String next() {
        if (hasNext()) {
            if (enumerationSize == NULL_LOCALE_ENUMERATION_SIZE) {
                cursor++;
                return templateName;
            }
            final String language = matcher.group(1);
            final String country = matcher.group(2);
            switch (cursor) {
                case 0: cursor++; return templateName + FILE_SEPARATOR + language + FILE_SEPARATOR + country;
                case 1: cursor++; return templateName + FILE_SEPARATOR + language + UNDERSCORE + country;
                case 2: cursor++; return templateName + FILE_SEPARATOR + language;
                case 3: cursor++; return templateName + UNDERSCORE + language + UNDERSCORE + country;
                case 4: cursor++; return templateName + UNDERSCORE + language;
                case 5: cursor++; return templateName;
            }
        }
        String message = "No next available template name combination.";
        LOGGER.error(message);
        throw new IllegalStateException(message);
    }
361978
def next(self):
        
        step = self.raw.get('max_results', 1000)
        start = self.raw.get('start_index', 1) + step
        self.raw['start_index'] = start
        return self