Package nl.jqno.equalsverifier.api
Class RelaxedEqualsVerifierApi<T>
- java.lang.Object
-
- nl.jqno.equalsverifier.api.RelaxedEqualsVerifierApi<T>
-
public class RelaxedEqualsVerifierApi<T> extends Object
API class forEqualsVerifier.forRelaxedEqualExamples(Object, Object, Object...)
. Its purpose is to make sure, at compile time, that a list of unequal examples is given, as well as the list of equal examples that are supplied to the aforementioned method.
-
-
Constructor Summary
Constructors Constructor Description RelaxedEqualsVerifierApi(Class<T> type, List<T> examples)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleTypeEqualsVerifierApi<T>
andUnequalExample(T example)
Asks for an unequal instance of T and subsequently returns a fully constructed instance ofEqualsVerifier
.SingleTypeEqualsVerifierApi<T>
andUnequalExamples(T first, T... more)
Asks for a list of unequal instances of T and subsequently returns a fully constructed instance ofEqualsVerifier
.
-
-
-
Method Detail
-
andUnequalExample
public SingleTypeEqualsVerifierApi<T> andUnequalExample(T example)
Asks for an unequal instance of T and subsequently returns a fully constructed instance ofEqualsVerifier
.- Parameters:
example
- An instance of T that is unequal to the previously supplied equal examples.- Returns:
- An instance of
EqualsVerifier
.
-
andUnequalExamples
@SafeVarargs public final SingleTypeEqualsVerifierApi<T> andUnequalExamples(T first, T... more)
Asks for a list of unequal instances of T and subsequently returns a fully constructed instance ofEqualsVerifier
.- Parameters:
first
- An instance of T that is unequal to the previously supplied equal examples.more
- More instances of T, all of which are unequal to one another, tofirst
, and to the previously supplied equal examples. May also contain instances of subclasses of T.- Returns:
- An instance of
EqualsVerifier
.
-
-