aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java')
-rw-r--r--sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java
index a4758f1b5..f513e011c 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- *
+ *
* @author Michael Dürre, Herbert Eiselt
*
*/
@@ -35,7 +35,7 @@ class SectionValue {
private String value;
private final List<String> comments;
private boolean isUncommented;
- // end of variables
+ // end of variables
// constructors
public SectionValue(String value, List<String> commentsForValue, boolean isuncommented) {
@@ -72,6 +72,16 @@ class SectionValue {
return this;
}
+ public void addComment(String comment) {
+ this.comments.add(comment);
+ this.isUncommented = false;
+ }
+
+ public void removeComment(String comment) {
+ this.comments.remove(comment);
+ this.isUncommented = this.comments.size()==0;
+ }
+
public List<String> getComments() {
return comments;
}