Exemplo n.º 1
0
 /**
  * Empty the buffer, then the iterator, without worrying about mode/state.
  *
  * @return
  */
 public FetchSetDatum drain() {
   if (!_queue.isEmpty()) {
     return removeFromQueue();
   } else if (safeHasNext()) {
     return new FetchSetDatum(new TupleEntry(_values.next()));
   } else {
     return null;
   }
 }
Exemplo n.º 2
0
 public boolean isEmpty() {
   return _queue.isEmpty() && !safeHasNext();
 }