Skip to content

Commit 9cd2b49

Browse files
committed
Update enum to pass name to constructor
1 parent 2a8d0cb commit 9cd2b49

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/main/java/org/commonwl/view/cwl/CWLProcess.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,18 @@
2323
* Enum for possible CWL processes
2424
*/
2525
public enum CWLProcess {
26-
WORKFLOW,
27-
COMMANDLINETOOL,
28-
EXPRESSIONTOOL;
26+
WORKFLOW("Workflow"),
27+
COMMANDLINETOOL("CommandLineTool"),
28+
EXPRESSIONTOOL("ExpressionTool");
29+
30+
private final String name;
31+
32+
CWLProcess(String name) {
33+
this.name = name;
34+
}
2935

3036
@Override
3137
public String toString() {
32-
switch (this) {
33-
case WORKFLOW:
34-
return "Workflow";
35-
case COMMANDLINETOOL:
36-
return "CommandLineTool";
37-
case EXPRESSIONTOOL:
38-
default:
39-
return "ExpressionTool";
40-
}
38+
return name;
4139
}
4240
}

0 commit comments

Comments
 (0)