tmf: keep event fields ordering as per ctf metadata
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / ctf / core / event / types / StructDefinition.java
index 52fb8f1781d5206ebcc8c5e9719fabd582fa8083..b7603497b473c06ab4ee7b00a0b90cc3b61c3b7d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
  *
  * All rights reserved. This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License v1.0 which
 
 package org.eclipse.linuxtools.ctf.core.event.types;
 
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.ListIterator;
+import java.util.Map;
 
 import org.eclipse.linuxtools.ctf.core.event.io.BitBuffer;
 
@@ -36,7 +37,7 @@ public class StructDefinition extends Definition implements IDefinitionScope {
     // ------------------------------------------------------------------------
 
     private final StructDeclaration declaration;
-    private final HashMap<String, Definition> definitions = new HashMap<String, Definition>();
+    private final Map<String, Definition> definitions = new LinkedHashMap<String, Definition>();
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -78,8 +79,9 @@ public class StructDefinition extends Definition implements IDefinitionScope {
 
     /**
      * @return The definitions of all the fields
+     * @since 2.0
      */
-    public HashMap<String, Definition> getDefinitions() {
+    public Map<String, Definition> getDefinitions() {
         return definitions;
     }
 
This page took 0.028062 seconds and 5 git commands to generate.