Ejemplo 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;
   }
 }
Ejemplo n.º 2
0
 public boolean isEmpty() {
   return _queue.isEmpty() && !safeHasNext();
 }