create changelog entry
[debian/openrocket] / android / src / net / sf / openrocket / android / thrustcurve / DownloadResponse.java
index c075d53fb1d10f669c27792877d9da2faddfc510..99d09762373dee29be672654616f39877b9c00fa 100644 (file)
@@ -1,23 +1,27 @@
 package net.sf.openrocket.android.thrustcurve;\r
 \r
+import java.util.ArrayList;\r
 import java.util.HashMap;\r
+import java.util.List;\r
 import java.util.Map;\r
 \r
 \r
 public class DownloadResponse {\r
 \r
-       private Map<Integer,MotorBurnFile> data = new HashMap<Integer,MotorBurnFile>();\r
+       private Map<Integer,List<MotorBurnFile>> data = new HashMap<Integer,List<MotorBurnFile>>();\r
        \r
        private String error = null;\r
        \r
        public void add( MotorBurnFile mbd ) {\r
-               MotorBurnFile currentData = data.get(mbd.getMotorId());\r
-               if ( currentData == null || currentData.getThrustCurveMotor() == null ) {\r
-                       data.put(mbd.getMotorId(),mbd);\r
+               List<MotorBurnFile> currentData = data.get(mbd.getMotorId());\r
+               if ( currentData == null ) {\r
+                       currentData = new ArrayList<MotorBurnFile>();\r
+                       data.put(mbd.getMotorId(), currentData);\r
                }\r
+               currentData.add(mbd);\r
        }\r
 \r
-       public MotorBurnFile getData(Integer motor_id) {\r
+       public List<MotorBurnFile> getData(Integer motor_id) {\r
                return data.get(motor_id);\r
        }\r
        \r