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

net.jqwik.engine.ArbitraryDelegator Maven / Gradle / Ivy

The newest version!
package net.jqwik.engine;

import net.jqwik.api.*;
import net.jqwik.api.arbitraries.*;

import org.jspecify.annotations.*;

public class ArbitraryDelegator extends ArbitraryDecorator {

	private final Arbitrary delegate;

	public ArbitraryDelegator(Arbitrary delegate) {
		this.delegate = delegate;
	}

	@Override
	protected Arbitrary arbitrary() {
		return delegate;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		ArbitraryDelegator that = (ArbitraryDelegator) o;
		return delegate.equals(that.delegate);
	}

	@Override
	public int hashCode() {
		return delegate.hashCode();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy