class FunctionFileName implements FileName {

    @Override
    public String getName(int executionNumber) {
        String name = nameFunc.apply(executionNumber);
        if (validator != null) {
            validator.accept(name);
        }
        return name;
    }

    public  FunctionFileName(Function<Integer, String> nameFunc, Consumer<String> validator);

}