AbstractIterator.hasNext
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.google.common.collect.AbstractIterator.hasNext(Showing top 15 results out of 315)

origin: google/guava

@CanIgnoreReturnValue // TODO(kak): Should we remove this?
@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: google/guava

assertTrue(iter.hasNext());
assertEquals(0, (int) iter.peek());
assertEquals(0, (int) iter.next());
origin: google/guava

 /**
  * Returns the next element in the iteration without advancing the iteration, according to the
  * contract of {@link PeekingIterator#peek()}.
  *
  * <p>Implementations of {@code AbstractIterator} that wish to expose this functionality should
  * implement {@code PeekingIterator}.
  */
 public final T peek() {
  if (!hasNext()) {
   throw new NoSuchElementException();
  }
  return next;
 }
}
origin: com.google.guava/guava

@CanIgnoreReturnValue // TODO(kak): Should we remove this?
@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: com.google.guava/guava

 /**
  * Returns the next element in the iteration without advancing the iteration, according to the
  * contract of {@link PeekingIterator#peek()}.
  *
  * <p>Implementations of {@code AbstractIterator} that wish to expose this functionality should
  * implement {@code PeekingIterator}.
  */
 public final T peek() {
  if (!hasNext()) {
   throw new NoSuchElementException();
  }
  return next;
 }
}
origin: google/j2objc

@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: google/j2objc

 /**
  * Returns the next element in the iteration without advancing the iteration,
  * according to the contract of {@link PeekingIterator#peek()}.
  *
  * <p>Implementations of {@code AbstractIterator} that wish to expose this
  * functionality should implement {@code PeekingIterator}.
  */
 public final T peek() {
  if (!hasNext()) {
   throw new NoSuchElementException();
  }
  return next;
 }
}
origin: wildfly/wildfly

@CanIgnoreReturnValue // TODO(kak): Should we remove this?
@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: wildfly/wildfly

 /**
  * Returns the next element in the iteration without advancing the iteration,
  * according to the contract of {@link PeekingIterator#peek()}.
  *
  * <p>Implementations of {@code AbstractIterator} that wish to expose this
  * functionality should implement {@code PeekingIterator}.
  */
 public final T peek() {
  if (!hasNext()) {
   throw new NoSuchElementException();
  }
  return next;
 }
}
origin: com.google.collections/google-collections

public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 return next;
}
origin: com.google.guava/guava-jdk5

@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: com.atlassian.bundles/google-collections

public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 return next;
}
origin: com.google.guava/guava-collections

public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 return next;
}
origin: intuit/wasabi

@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 T result = next;
 next = null;
 return result;
}
origin: org.sonatype.sisu/sisu-guava

@Override
public final T next() {
 if (!hasNext()) {
  throw new NoSuchElementException();
 }
 state = State.NOT_READY;
 return next;
}
com.google.common.collectAbstractIteratorhasNext

Popular methods of AbstractIterator

  • computeNext
    Returns the next element. Note: the implementation must call #endOfData() when there are no elements
  • tryToComputeNext
  • next
  • peek
    Returns the next element in the iteration without advancing the iteration, according to the contract

Popular classes and methods

  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • ArrayList (java.util)
    Resizable-array implementation of the List interface.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)