|
24 | 24 | */ |
25 | 25 | public class AddEdge extends SsurgeonEdit { |
26 | 26 | 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; |
31 | 31 |
|
32 | 32 | 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); |
37 | 34 | } |
38 | 35 |
|
39 | 36 | 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; |
41 | 40 | this.weight = weight; |
42 | 41 | } |
43 | 42 |
|
|
0 commit comments