File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11package edu .stanford .nlp .semgraph .semgrex ;
22
33import edu .stanford .nlp .stats .IntCounter ;
4- import edu .stanford .nlp .util .Generics ;
54
5+ import java .util .HashMap ;
66import java .util .Map ;
77
88/** a class that takes care of the stuff necessary for variable strings.
1212 * @author Roger Levy ([email protected] ) 1313 */
1414class VariableStrings {
15- private Map <Object , String > varsToStrings ;
16- private IntCounter <Object > numVarsSet ;
15+ private final Map <Object , String > varsToStrings ;
16+ private final IntCounter <Object > numVarsSet ;
1717
1818 public VariableStrings () {
19- varsToStrings = Generics . newHashMap ();
19+ varsToStrings = new HashMap <> ();
2020 numVarsSet = new IntCounter <>();
2121 }
2222
23+ public VariableStrings (VariableStrings other ) {
24+ varsToStrings = new HashMap <>(other .varsToStrings );
25+ numVarsSet = new IntCounter <>(other .numVarsSet );
26+ }
27+
2328 public boolean isSet (Object o ) {
2429 return numVarsSet .getCount (o ) == 1 ;
2530 }
You can’t perform that action at this time.
0 commit comments