com.hubspot.chrome.devtools.client.core.css.RuleMatch Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.css;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* Match data for a CSS rule.
*/
public final class RuleMatch {
private CSSRule rule;
private List matchingSelectors;
@JsonCreator
public RuleMatch(@JsonProperty("rule") CSSRule rule,
@JsonProperty("matchingSelectors") List matchingSelectors) {
this.rule = rule;
this.matchingSelectors = matchingSelectors;
}
public CSSRule getRule() {
return rule;
}
public List getMatchingSelectors() {
return matchingSelectors;
}
public static RuleMatch.Builder builder() {
return new RuleMatch.Builder();
}
public static final class Builder {
private CSSRule rule;
private List matchingSelectors;
private Builder() {
}
public RuleMatch.Builder setRule(CSSRule rule) {
this.rule = rule;
return this;
}
public RuleMatch.Builder setMatchingSelectors(List matchingSelectors) {
this.matchingSelectors = matchingSelectors;
return this;
}
public RuleMatch build() {
return new RuleMatch(rule, matchingSelectors);
}
}
}