private void findTop() {
   topKey = null;
   topValue = null;
   while (source.hasTop()) {
     if (inBounds(source.getTopKey())) {
       topKey = source.getTopKey();
       topValue = source.getTopValue();
       return;
     } else {
       try {
         source.next();
       } catch (final IOException e) {
         throw new RuntimeException(e);
       }
     }
   }
 }
Example #2
0
  public static Map.Entry<Key, Value> copyTopEntry(SortedKeyValueIterator<Key, Value> skvi) {
    final Key k = keyCopy(skvi.getTopKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL);
    final Value v = new Value(skvi.getTopValue());
    return new Map.Entry<Key, Value>() {
      @Override
      public Key getKey() {
        return k;
      }

      @Override
      public Value getValue() {
        return v;
      }

      @Override
      public Value setValue(Value value) {
        throw new UnsupportedOperationException();
      }
    };
  }
 @Override
 public Value getTopValue() {
   return mapIterator.getTopValue();
 }
 @Override
 public synchronized V getTopValue() {
   return source.getTopValue();
 }