View Javadoc
1   /**
2    * This Source Code Form is subject to the terms of the Mozilla Public
3    * License, v. 2.0. If a copy of the MPL was not distributed with this
4    * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5    *
6    * If it is not possible or desirable to put the notice in a particular
7    * file, then You may include the notice in a location (such as a LICENSE
8    * file in a relevant directory) where a recipient would be likely to look
9    * for such a notice.
10  
11   * 
12   */
13   
14  /*  ---------------------------------------------------------------------------
15   *  U.S. Government, Department of the Army
16   *  Army Materiel Command
17   *  Research Development Engineering Command
18   *  Communications Electronics Research Development and Engineering Center
19   *  ---------------------------------------------------------------------------
20   */
21   
22  package org.miloss.fgsms.presentation;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * This is a simple container for Machine and Network Data, used for charting purposes
29   * @author AO
30   */
31  public class MachineNetworkData {
32    public List<RateStruct> stuff;
33      public MachineNetworkData()
34      {
35          stuff = new ArrayList<RateStruct>();
36      }
37      public boolean Contains(String item)
38      {
39          for (int i=0; i< stuff.size(); i++)
40          {
41              if (stuff.get(i).item.equalsIgnoreCase(item))
42                  return true;
43          }
44          return false;
45      }
46  
47      public void add(RateStruct add)
48      {
49          stuff.add(add);
50  
51      }
52  
53      public List<TransactionLogTimeStampStruct> get(String action)
54      {
55          for (int i=0; i< stuff.size(); i++)
56          {
57              if (stuff.get(i).item.equalsIgnoreCase(action))
58                  return stuff.get(i).data;
59          }
60          return null;
61      }
62      public int Size()
63      {
64          return stuff.size();
65      }
66  
67  }