11package pcminer ;
22
3- import java .util .HashMap ;
4- import java .util .HashSet ;
3+ import java .util .LinkedHashMap ;
4+ import java .util .LinkedHashSet ;
55import java .util .Map ;
66import java .util .Set ;
77
@@ -25,8 +25,8 @@ private Author(String name) {
2525 (name .indexOf (" " ) != -1 ) ? name .substring (0 , name .lastIndexOf (" " )).trim () : "" ;
2626 this .lastName =
2727 (name .indexOf (" " ) != -1 ) ? name .substring (name .lastIndexOf (" " ) + 1 ).trim () : name ;
28- this .publications = new HashSet < Publication >();
29- this .committees = new HashSet < CommitteeRole >();
28+ this .publications = new LinkedHashSet < >();
29+ this .committees = new LinkedHashSet < >();
3030 }
3131
3232 public void addPublication (Publication pub ) {
@@ -145,15 +145,15 @@ public String toJson(int indent) {
145145 private final Set <Publication > publications ;
146146 private final Set <CommitteeRole > committees ;
147147
148- private static Map <String , String > nameMappings = new HashMap < String , String >();
149- private static Map <Author , Author > authors = new HashMap < Author , Author >();
148+ private static Map <String , String > nameMappings = new LinkedHashMap < >();
149+ private static Map <Author , Author > authors = new LinkedHashMap < >();
150150
151151 public static void addNameMapping (String from , String to ) {
152152 nameMappings .put (from , to );
153153 }
154154
155155 public static Set <Author > getAuthors () {
156- return new HashSet < Author >(authors .keySet ());
156+ return new LinkedHashSet < >(authors .keySet ());
157157 }
158158
159159 public static int nrAuthors () {
0 commit comments