本文整理了Java中org.sonar.api.rules.Rule.equals
方法的一些代码示例,展示了Rule.equals
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rule.equals
方法的具体详情如下:
包路径:org.sonar.api.rules.Rule
类名称:Rule
方法名:equals
暂无
代码示例来源:origin: SonarSource/sonarqube
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActiveRule that = (ActiveRule) o;
if (!rule.equals(that.rule)) {
return false;
}
return !((rulesProfile != null) ? !rulesProfile.equals(that.rulesProfile) : (that.rulesProfile != null));
}
代码示例来源:origin: SonarSource/sonarqube
/**
* @param optionalSeverity if null, then the default rule severity is used
*/
public ActiveRule activateRule(final Rule rule, @Nullable RulePriority optionalSeverity) {
if (activeRules.stream().anyMatch(ar -> ar.getRule().equals(rule))) {
throw MessageException.of(String.format(
"The definition of the profile '%s' (language '%s') contains multiple occurrences of the '%s:%s' rule. The plugin which declares this profile should fix this.",
getName(), getLanguage(), rule.getRepositoryKey(), rule.getKey()));
}
ActiveRule activeRule = new ActiveRule(this, rule, optionalSeverity);
activeRules.add(activeRule);
return activeRule;
}
代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api
@Override
public boolean apply(ActiveRule input) {
return input.getRule().equals(rule);
}
})) {
代码示例来源:origin: org.sonarsource.sonarqube/sonar-plugin-api
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActiveRule that = (ActiveRule) o;
if (!rule.equals(that.rule)) {
return false;
}
return !((rulesProfile != null) ? !rulesProfile.equals(that.rulesProfile) : (that.rulesProfile != null));
}
代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActiveRule that = (ActiveRule) o;
if (!rule.equals(that.rule)) {
return false;
}
if (rulesProfile != null ? !rulesProfile.equals(that.rulesProfile) : that.rulesProfile != null) {
return false;
}
return true;
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-plugin-api
/**
* @param optionalSeverity if null, then the default rule severity is used
*/
public ActiveRule activateRule(final Rule rule, @Nullable RulePriority optionalSeverity) {
if (activeRules.stream().anyMatch(ar -> ar.getRule().equals(rule))) {
throw MessageException.of(String.format(
"The definition of the profile '%s' (language '%s') contains multiple occurrences of the '%s:%s' rule. The plugin which declares this profile should fix this.",
getName(), getLanguage(), rule.getRepositoryKey(), rule.getKey()));
}
ActiveRule activeRule = new ActiveRule(this, rule, optionalSeverity);
activeRules.add(activeRule);
return activeRule;
}
内容来源于网络,如有侵权,请联系作者删除!