1 package net.sf.openrocket.android.thrustcurve;
\r
3 import java.util.ArrayList;
\r
4 import java.util.HashMap;
\r
5 import java.util.List;
\r
6 import java.util.Map;
\r
9 public class DownloadResponse {
\r
11 private Map<Integer,List<MotorBurnFile>> data = new HashMap<Integer,List<MotorBurnFile>>();
\r
13 private String error = null;
\r
15 public void add( MotorBurnFile mbd ) {
\r
16 List<MotorBurnFile> currentData = data.get(mbd.getMotorId());
\r
17 if ( currentData == null ) {
\r
18 currentData = new ArrayList<MotorBurnFile>();
\r
19 data.put(mbd.getMotorId(), currentData);
\r
21 currentData.add(mbd);
\r
24 public List<MotorBurnFile> getData(Integer motor_id) {
\r
25 return data.get(motor_id);
\r
28 public void setError(String error) {
\r
32 public String getError() {
\r
37 public String toString() {
\r
38 return "DownloadResponse [error=" + error + ", data=" + data + "]";
\r