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

net.jqwik.engine.properties.FalsifiedSampleImpl Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
package net.jqwik.engine.properties;

import java.util.*;

import net.jqwik.api.*;
import net.jqwik.api.lifecycle.*;

public class FalsifiedSampleImpl implements FalsifiedSample {

	private final List parameters;
	private final List> shrinkables;
	private final Optional falsifyingError;
	private final List footnotes;

	public FalsifiedSampleImpl(
		List parameters,
		List> shrinkables,
		Optional falsifyingError,
		List footnotes
	) {
		this.parameters = parameters;
		this.shrinkables = shrinkables;
		this.falsifyingError = falsifyingError;
		this.footnotes = footnotes;
	}

	@Override
	public List parameters() {
		return parameters;
	}

	@Override
	public List> shrinkables() {
		return shrinkables;
	}

	@Override
	public Optional falsifyingError() {
		return falsifyingError;
	}

	@Override
	public List footnotes() {
		return footnotes;
	}

	@Override
	public boolean equals(final Object o) {
		if (this == o) return true;
		if (!(o instanceof FalsifiedSample)) return false;
		FalsifiedSample that = (FalsifiedSample) o;
		return parameters.equals(that.parameters()) &&
				   shrinkables.equals(that.shrinkables()) &&
				   falsifyingError.equals(that.falsifyingError());
	}

	@Override
	public int hashCode() {
		return Objects.hash(parameters);
	}

}