public class FilteredPact<I extends Interaction> implements Pact<I>
public FilteredPact(@NotNull
Pact<I> pact,
@NotNull
java.util.function.Predicate<I> interactionPredicate)
@NotNull public java.util.List<I> getInteractions()
Returns all the interactions of the pact
public boolean isNotFiltered()
public boolean isFiltered()
@NotNull public java.lang.String toString()
@NotNull public Pact<I> getPact()
@NotNull public Consumer getConsumer()
Returns the consumer of the service for the pact
@NotNull public Provider getProvider()
Returns the provider of the service for the pact
@NotNull public PactSource getSource()
The source that this pact was loaded from
public boolean compatibleTo(@NotNull
Pact<?> other)
If this pact is compatible with the other pact. Pacts are compatible if they have the same provider and they are the same type
public void mergeInteractions(@NotNull
java.util.List<?> interactions)
Merges all the interactions into this Pact
interactions - @NotNull public Pact<I> sortInteractions()
Returns a pact with the interactions sorted
@NotNull
public java.util.Map<java.lang.String,?> toMap(@NotNull
PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.