@@ -38,7 +38,7 @@ public class SystemModel {
38
38
public HashMap <String , Vector <Target >> childTargetTypes = new HashMap <String , Vector <Target >>();
39
39
40
40
// From attribute types
41
- public HashMap <String , Enumerator > enumerations = new HashMap <String , Enumerator >();
41
+ public TreeMap <String , Enumerator > enumerations = new TreeMap <String , Enumerator >();
42
42
public HashMap <String , Attribute > attributes = new HashMap <String , Attribute >();
43
43
44
44
// List of targets in current system
@@ -48,7 +48,7 @@ public class SystemModel {
48
48
private Vector <Target > busTypes = new Vector <Target >();
49
49
private PropertyChangeSupport changes = new PropertyChangeSupport (this );
50
50
51
- private HashMap <String , HashMap <String , Field >> globalSettings = new HashMap <String , HashMap <String , Field >>();
51
+ private TreeMap <String , TreeMap <String , Field >> globalSettings = new TreeMap <String , TreeMap <String , Field >>();
52
52
53
53
public String logData ;
54
54
@@ -358,9 +358,9 @@ public void writeEnumeration(Writer out) throws Exception {
358
358
}
359
359
360
360
public Field setGlobalSetting (String path , String attribute , String value ) {
361
- HashMap <String , Field > s = globalSettings .get (path );
361
+ TreeMap <String , Field > s = globalSettings .get (path );
362
362
if (s == null ) {
363
- s = new HashMap <String , Field >();
363
+ s = new TreeMap <String , Field >();
364
364
globalSettings .put (path , s );
365
365
}
366
366
Field f = s .get (attribute );
@@ -374,7 +374,7 @@ public Field setGlobalSetting(String path, String attribute, String value) {
374
374
}
375
375
376
376
public Boolean isGlobalSetting (String path , String attribute ) {
377
- HashMap <String , Field > s = globalSettings .get (path );
377
+ TreeMap <String , Field > s = globalSettings .get (path );
378
378
if (s == null ) {
379
379
return false ;
380
380
}
@@ -386,7 +386,7 @@ public Boolean isGlobalSetting(String path, String attribute) {
386
386
}
387
387
388
388
public Field getGlobalSetting (String path , String attribute ) {
389
- HashMap <String , Field > s = globalSettings .get (path );
389
+ TreeMap <String , Field > s = globalSettings .get (path );
390
390
if (s == null ) {
391
391
Field f =this .setGlobalSetting (path , attribute , "" );
392
392
return f ;
@@ -398,13 +398,13 @@ public Field getGlobalSetting(String path, String attribute) {
398
398
return f ;
399
399
}
400
400
401
- public HashMap <String , Field > getGlobalSettings (String path ) {
402
- HashMap <String , Field > s = globalSettings .get (path );
401
+ public TreeMap <String , Field > getGlobalSettings (String path ) {
402
+ TreeMap <String , Field > s = globalSettings .get (path );
403
403
return s ;
404
404
}
405
405
406
406
public void writeGlobalSettings (Writer out ) throws Exception {
407
- for (Map .Entry <String , HashMap <String , Field >> entry : this .globalSettings .entrySet ()) {
407
+ for (Map .Entry <String , TreeMap <String , Field >> entry : this .globalSettings .entrySet ()) {
408
408
out .write ("<globalSetting>\n " );
409
409
out .write ("\t <id>" + entry .getKey () + "</id>\n " );
410
410
for (Map .Entry <String , Field > setting : entry .getValue ().entrySet ()) {
0 commit comments