public class MatchingRulesImpl implements MatchingRules
public static au.com.dius.pact.core.model.matchingrules.MatchingRulesImpl.Companion Companion
@NotNull public java.util.Map<java.lang.String,au.com.dius.pact.core.model.matchingrules.Category> getRules()
@NotNull public Category rulesForCategory(@NotNull java.lang.String category)
Get all the rules for a given category
@NotNull public Category addCategory(@NotNull Category category)
Adds the category to the collection
@NotNull public Category addCategory(@NotNull java.lang.String category)
Adds a new category with the given name to the collection
@NotNull public MatchingRules copy()
Create a new copy of the matching rules
public void fromV2Json(@NotNull
com.google.gson.JsonObject json)
public boolean isEmpty()
If the matching rules are empty
public boolean isNotEmpty()
If the matching rules is not empty
public boolean hasCategory(@NotNull
java.lang.String category)
If the matching rules has the named category
@NotNull public java.util.Set<java.lang.String> getCategories()
Returns the set of all categories that rules are defined for
@NotNull public java.lang.String toString()
public boolean equals(@Nullable
java.lang.Object other)
public int hashCode()
@NotNull
public java.util.Map<java.lang.String,java.lang.Object> toMap(@NotNull
PactSpecVersion pactSpecVersion)
Converts these rules into a Map that can be serialised to JSON
public void fromV3Json(@NotNull
com.google.gson.JsonObject json)
@JvmStatic @NotNull public static MatchingRules fromJson(@Nullable com.google.gson.JsonElement json)