package stexfires.core.mapper.fieldvalue;

import stexfires.core.Field;

import java.util.Objects;
import java.util.function.Supplier;

/**
 * @author Mathias Kalb
 * @since 0.1
 */
public class SupplierFieldValueMapper implements FieldValueMapper {

    protected final Supplier<String> valueSupplier;

    /**
     * @param valueSupplier must be thread-safe
     */
    public SupplierFieldValueMapper(Supplier<String> valueSupplier) {
        Objects.requireNonNull(valueSupplier);
        this.valueSupplier = valueSupplier;
    }

    @Override
    public String mapToValue(Field field) {
        return valueSupplier.get();
    }

}

@@ -92,16 +92,95 @@
 bjects;%0A
+import java.util.function.IntSupplier;%0Aimport java.util.function.LongSupplier;%0A
 import j
@@ -608,16 +608,609 @@
 %0A    %7D%0A%0A
+    /**%0A     * @param valueSupplier must be thread-safe%0A     */%0A    public static SupplierFieldValueMapper intSupplier(IntSupplier valueSupplier) %7B%0A        Objects.requireNonNull(valueSupplier);%0A        return new SupplierFieldValueMapper(() -%3E String.valueOf(valueSupplier.getAsInt()));%0A    %7D%0A%0A    /**%0A     * @param valueSupplier must be thread-safe%0A     */%0A    public static SupplierFieldValueMapper longSupplier(LongSupplier valueSupplier) %7B%0A        Objects.requireNonNull(valueSupplier);%0A        return new SupplierFieldValueMapper(() -%3E String.valueOf(valueSupplier.getAsLong()));%0A    %7D%0A%0A
     @Ove

Add static methods