@Override public boolean hasNext() { return keyValueSource.hasNext(); }
@Override public boolean hasNext() { return keyValueSource.hasNext(); }
@Override public void executeMappingPhase(KeyValueSource<KeyIn, ValueIn> keyValueSource, Mapper<KeyIn, ValueIn, KeyOut, ValueOut> mapper, Context<KeyOut, ValueOut> context) { while (keyValueSource.hasNext()) { if (matches(keyValueSource.key())) { Map.Entry<KeyIn, ValueIn> entry = keyValueSource.element(); mapper.map(entry.getKey(), entry.getValue(), context); } if (isCancelled()) { return; } } } }
@Override public void executeMappingPhase(KeyValueSource<KeyIn, ValueIn> keyValueSource, Mapper<KeyIn, ValueIn, KeyOut, ValueOut> mapper, Context<KeyOut, ValueOut> context) { while (keyValueSource.hasNext()) { if (matches(keyValueSource.key())) { Map.Entry<KeyIn, ValueIn> entry = keyValueSource.element(); mapper.map(entry.getKey(), entry.getValue(), context); } if (isCancelled()) { return; } } } }