All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hyperfoil.core.parser.Adapter Maven / Gradle / Ivy

There is a newer version: 0.27.1
Show newest version
package io.hyperfoil.core.parser;

import java.util.function.Function;

class Adapter implements Parser {
   private final Function adapter;
   private final Parser parser;

   Adapter(Function adapter, Parser parser) {
      this.adapter = adapter;
      this.parser = parser;
   }

   @Override
   public void parse(Context ctx, A target) throws ParserException {
      parser.parse(ctx, adapter.apply(target));
   }
}