Skip to content

Commit ddb0c90

Browse files
committed
Make a few things final for better readability in Ssurgeon
1 parent 23a8952 commit ddb0c90

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/AddEdge.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,19 @@
2424
*/
2525
public class AddEdge extends SsurgeonEdit {
2626
public static final String LABEL = "addEdge";
27-
protected String govName; // Name of governor of this reln, in match
28-
protected String depName; // Name of the dependent in this reln, in match
29-
protected GrammaticalRelation relation; // Type of relation to add between these edges
30-
protected double weight;
27+
protected final String govName; // Name of governor of this reln, in match
28+
protected final String depName; // Name of the dependent in this reln, in match
29+
protected final GrammaticalRelation relation; // Type of relation to add between these edges
30+
protected final double weight;
3131

3232
public AddEdge(String govName, String depName, GrammaticalRelation relation) {
33-
this.govName = govName;
34-
this.depName = depName;
35-
this.relation = relation;
36-
this.weight = 0;
33+
this(govName, depName, relation, 0.0);
3734
}
3835

3936
public AddEdge(String govName, String depName, GrammaticalRelation relation, double weight) {
40-
this(govName, depName, relation);
37+
this.govName = govName;
38+
this.depName = depName;
39+
this.relation = relation;
4140
this.weight = weight;
4241
}
4342

0 commit comments

Comments
 (0)