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

io.dropwizard.vavr.validation.ValueValidatedValueExtractor Maven / Gradle / Ivy

package io.dropwizard.vavr.validation;

import io.vavr.Value;

import javax.validation.valueextraction.ExtractedValue;
import javax.validation.valueextraction.UnwrapByDefault;
import javax.validation.valueextraction.ValueExtractor;

/**
 * A {@link ValueExtractor} for Vavr's {@link Value}.
 * 

* Extracts the value contained by the {@link Value} for validation, or produces {@code null}. */ @UnwrapByDefault public class ValueValidatedValueExtractor implements ValueExtractor> { @Override public void extractValues(Value originalValue, ValueExtractor.ValueReceiver receiver) { receiver.value(null, originalValue.getOrNull()); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy