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