test_class.declarator: resultSet
test_class.modifier: private
test_class.original_string: private ResultSet resultSet;
test_class.type: ResultSet
test_class.var_name: resultSet
test_class.file: gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ResultSetTest.java
test_class.identifier: ResultSetTest
test_class.superclass: extends AbstractResultQueueTest
test_case.body: @Test
      public void shouldIterate() throws Exception {
          final Iterator itty = resultSet.iterator();
          final AtomicInteger counter = new AtomicInteger(0);
  
          addToQueue(100, 1, true, true);
  
          while (itty.hasNext()) {
              itty.next();
              counter.incrementAndGet();
          }
  
          assertEquals(100, counter.get());
      }
test_case.class_method_signature: ResultSetTest.shouldIterate()
test_case.full_signature: @Test public void shouldIterate()
test_case.identifier: shouldIterate
test_case.invocations: iterator addToQueue hasNext next incrementAndGet assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldIterate()
focal_class.declarator: resultQueue
focal_class.modifier: private final
focal_class.original_string: private final ResultQueue resultQueue;
focal_class.type: ResultQueue
focal_class.var_name: resultQueue
focal_class.declarator: executor
focal_class.modifier: private final
focal_class.original_string: private final ExecutorService executor;
focal_class.type: ExecutorService
focal_class.var_name: executor
focal_class.declarator: readCompleted
focal_class.modifier: private final
focal_class.original_string: private final CompletableFuture<Void> readCompleted;
focal_class.type: CompletableFuture<Void>
focal_class.var_name: readCompleted
focal_class.file: gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ResultSet.java
focal_class.identifier: ResultSet
focal_class.interfaces: implements Iterable<Result>
focal_class.class_method_signature: ResultSet.ResultSet(final ResultQueue resultQueue, final ExecutorService executor,
                       final CompletableFuture<Void> readCompleted)
focal_class.full_signature: public  ResultSet(final ResultQueue resultQueue, final ExecutorService executor,
                       final CompletableFuture<Void> readCompleted)
focal_class.identifier: ResultSet
focal_class.modifiers: public
focal_class.parameters: (final ResultQueue resultQueue, final ExecutorService executor,
                       final CompletableFuture<Void> readCompleted)
focal_class.signature:  ResultSet(final ResultQueue resultQueue, final ExecutorService executor,
                       final CompletableFuture<Void> readCompleted)
focal_class.class_method_signature: ResultSet.allItemsAvailable()
focal_class.full_signature: public boolean allItemsAvailable()
focal_class.identifier: allItemsAvailable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean allItemsAvailable()
focal_class.class_method_signature: ResultSet.getAvailableItemCount()
focal_class.full_signature: public int getAvailableItemCount()
focal_class.identifier: getAvailableItemCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAvailableItemCount()
focal_class.class_method_signature: ResultSet.one()
focal_class.full_signature: public Result one()
focal_class.identifier: one
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Result
focal_class.signature: Result one()
focal_class.class_method_signature: ResultSet.some(final int items)
focal_class.full_signature: public CompletableFuture<List<Result>> some(final int items)
focal_class.identifier: some
focal_class.modifiers: public
focal_class.parameters: (final int items)
focal_class.return: CompletableFuture<List<Result>>
focal_class.signature: CompletableFuture<List<Result>> some(final int items)
focal_class.class_method_signature: ResultSet.all()
focal_class.full_signature: public CompletableFuture<List<Result>> all()
focal_class.identifier: all
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: CompletableFuture<List<Result>>
focal_class.signature: CompletableFuture<List<Result>> all()
focal_class.class_method_signature: ResultSet.stream()
focal_class.full_signature: public Stream<Result> stream()
focal_class.identifier: stream
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Stream<Result>
focal_class.signature: Stream<Result> stream()
focal_class.class_method_signature: ResultSet.iterator()
focal_class.full_signature: @Override public Iterator<Result> iterator()
focal_class.identifier: iterator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Iterator<Result>
focal_class.signature: Iterator<Result> iterator()
focal_method.body: @Override
      public Iterator<Result> iterator() {
          return new Iterator<Result>() {
              private Result nextOne = null;
  
              @Override
              public boolean hasNext() {
                  if (null == nextOne) {
                      nextOne = one();
                  }
                  return nextOne != null;
              }
  
              @Override
              public Result next() {
                  if (null != nextOne || hasNext()) {
                      final Result r = nextOne;
                      nextOne = null;
                      return r;
                  } else
                      throw new NoSuchElementException();
              }
  
              @Override
              public void remove() {
                  throw new UnsupportedOperationException();
              }
          };
      }
focal_method.class_method_signature: ResultSet.iterator()
focal_method.full_signature: @Override public Iterator<Result> iterator()
focal_method.identifier: iterator
focal_method.invocations: one hasNext
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Iterator<Result>
focal_method.signature: Iterator<Result> iterator()