aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-10-01 14:46:56 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-10-01 14:46:56 +0000
commita6efdd8dab3a975c860e3341a2feacc9d9c63899 (patch)
treec0926b2af024d44fa139c418a0ca20600fb43016 /sonar-plugin-api/src
parentebfadacd34d9c6d83bd91d5d688b10929eed7417 (diff)
downloadsonarqube-a6efdd8dab3a975c860e3341a2feacc9d9c63899.tar.gz
sonarqube-a6efdd8dab3a975c860e3341a2feacc9d9c63899.zip
quality model API: add the method Characteristic.create(), without parameters
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java
index f61cc3ad6aa..e6cb3b78ce6 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java
@@ -105,7 +105,7 @@ public final class Characteristic implements Comparable<Characteristic> {
return key;
}
- Characteristic setKey(String s) {
+ public Characteristic setKey(String s) {
this.key = StringUtils.trimToEmpty(s);
return this;
}
@@ -114,7 +114,7 @@ public final class Characteristic implements Comparable<Characteristic> {
return name;
}
- Characteristic setName(String s, boolean asKey) {
+ public Characteristic setName(String s, boolean asKey) {
this.name = StringUtils.trimToEmpty(s);
if (asKey) {
this.key = StringUtils.upperCase(this.name);
@@ -329,6 +329,10 @@ public final class Characteristic implements Comparable<Characteristic> {
return order - o.order;
}
+ public static Characteristic create() {
+ return new Characteristic();
+ }
+
public static Characteristic createByName(String name) {
return new Characteristic().setName(name, true);
}