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

net.jqwik.vavr.arbitraries.control.VavrEitherArbitrary Maven / Gradle / Ivy

package net.jqwik.vavr.arbitraries.control;

import net.jqwik.vavr.arbitraries.base.DoubleValueArbitrary;
import io.vavr.control.Either;
import net.jqwik.api.Arbitrary;

public class VavrEitherArbitrary extends DoubleValueArbitrary>
        implements Arbitrary> {

    public VavrEitherArbitrary(final Arbitrary leftArbitrary, final Arbitrary rightArbitrary) {
        super(leftArbitrary, rightArbitrary);
    }

    @Override
    protected Either mapFirstValue(final L value) {
        return Either.left(value);
    }

    @Override
    protected Either mapSecondValue(final R value) {
        return Either.right(value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy