code: @Override
      @DoesServiceRequest
      public boolean hasNext() {
          while (this.currentSegment == null
                  || (!this.currentSegmentIterator.hasNext() && this.currentSegment != null && this.currentSegment
                          .getHasMoreResults())) {
              try {
                  this.currentSegment = ExecutionEngine.executeWithRetry(this.client, this.parentObject,
                          this.segmentGenerator, this.policyFactory, this.opContext);
              }
              catch (final StorageException e) {
                  final NoSuchElementException ex = new NoSuchElementException(SR.ENUMERATION_ERROR);
                  ex.initCause(e);
                  throw ex;
              }
              this.currentSegmentIterator = this.currentSegment.getResults().iterator();
  
              if (!this.currentSegmentIterator.hasNext() && !this.currentSegment.getHasMoreResults()) {
                  return false;
              }
          }
  
          return this.currentSegmentIterator.hasNext();
      }
docs: Indicates if the iterator has another element.