Skip to content

Commit

Permalink
Override the setParam method #56
Browse files Browse the repository at this point in the history
  • Loading branch information
zjzxiaohei committed Jul 29, 2024
1 parent b80f586 commit a259164
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,13 @@ public Map<String, Value> getParams() {
);
}

@Override
public void setParam(String paramName, Value value) {
if (paramName.equals(alphaParamName)) alpha = value;
else if (paramName.equals(tParamName)) t = value;
else if (paramName.equals(vParamName)) v = value;
else if (paramName.equals(sParamName)) s = value;
else throw new RuntimeException("Unrecognised parameter name: " + paramName);
}

}

0 comments on commit a259164

Please sign in to comment.