Skip to content
Permalink
Browse files

Change Conditional Operator

  • Loading branch information...
danielb987 committed Sep 20, 2018
1 parent 15114f2 commit fea5289907de6a12fbe28dd0e39ae92a6ad4e6aa
@@ -59,21 +59,12 @@
OR;

// This method is used by DefaultConditionalManagerXml.store() for backward compatibility
public int getIntValue(boolean not) {
if (not) {
switch (this) {
case NONE: return OPERATOR_NOT; // backward compatibility
case AND: return OPERATOR_AND_NOT; // backward compatibility
case OR: return OPERATOR_OR;
default: throw new IllegalArgumentException(String.format("operator %s is unknown", this.name()));
}
} else {
switch (this) {
case NONE: return OPERATOR_NONE;
case AND: return OPERATOR_AND;
case OR: return OPERATOR_OR;
default: throw new IllegalArgumentException(String.format("operator %s is unknown", this.name()));
}
public int getIntValue() {
switch (this) {
case NONE: return OPERATOR_NONE;
case AND: return OPERATOR_AND;
case OR: return OPERATOR_OR;
default: throw new IllegalArgumentException(String.format("operator %s is unknown", this.name()));
}
}

@@ -98,7 +98,7 @@ public Element store(Object o) {
for (int k = 0; k < variableList.size(); k++) {
ConditionalVariable variable = variableList.get(k);
Element vElem = new Element("conditionalStateVariable"); // NOI18N
int oper = variable.getOpern().getIntValue(variable.isNegated());
int oper = variable.getOpern().getIntValue();
vElem.setAttribute("operator", Integer.toString(oper)); // NOI18N
if (variable.isNegated()) {
vElem.setAttribute("negated", "yes"); // NOI18N

0 comments on commit fea5289

Please sign in to comment.
You can’t perform that action at this time.