Ejemplo n.º 1
0
 @Override
 public void close() throws IOException {
   // all other scanners are closed already
   for (TripleScanner scanner : scannerHeap) {
     scanner.close();
   }
 }
Ejemplo n.º 2
0
 private Triple popTriple() throws IOException {
   // get top scanner
   TripleScanner scanner = scannerHeap.poll();
   // remove next triple
   Triple next = scanner.pop();
   // more triples in this scanner?
   if (scanner.next()) {
     // yep, put it back
     scannerHeap.add(scanner);
   } else {
     // nope, we're done with it
     scanner.close();
   }
   return next;
 }
Ejemplo n.º 3
0
 @Override
 public int compare(TripleScanner s1, TripleScanner s2) {
   return order.comparator().compare(s1.peek(), s2.peek());
 }