--- /dev/null
+/** @file\r
+ \r
+ The file is used to define Package Dependencies Vector\r
+ \r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+ \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ \r
+ **/\r
+package org.tianocore.frameworkwizard.module.Identifications.Hobs;\r
+\r
+import java.util.Vector;\r
+\r
+public class HobsVector {\r
+\r
+ private Vector<HobsIdentification> vHobs = new Vector<HobsIdentification>();\r
+\r
+ public int findHobs(HobsIdentification sfi) {\r
+ for (int index = 0; index < vHobs.size(); index++) {\r
+ if (vHobs.elementAt(index).equals(sfi)) {\r
+ return index;\r
+ }\r
+ }\r
+ return -1;\r
+ }\r
+\r
+ public int findHobs(String name) {\r
+ for (int index = 0; index < vHobs.size(); index++) {\r
+ if (vHobs.elementAt(index).getName().equals(name)) {\r
+ return index;\r
+ }\r
+ }\r
+ return -1;\r
+ }\r
+\r
+ public HobsIdentification getHobs(int index) {\r
+ if (index > -1) {\r
+ return vHobs.elementAt(index);\r
+ } else {\r
+ return null;\r
+ }\r
+ }\r
+\r
+ public void addHobs(HobsIdentification arg0) {\r
+ vHobs.addElement(arg0);\r
+ }\r
+\r
+ public void updateHobs(HobsIdentification arg0, int arg1) {\r
+ vHobs.setElementAt(arg0, arg1);\r
+ }\r
+\r
+ public void removeHobs(HobsIdentification arg0) {\r
+ int index = findHobs(arg0);\r
+ if (index > -1) {\r
+ vHobs.removeElementAt(index);\r
+ }\r
+ }\r
+\r
+ public void removeHobs(int index) {\r
+ if (index > -1 && index < this.size()) {\r
+ vHobs.removeElementAt(index);\r
+ }\r
+ }\r
+\r
+ public Vector<HobsIdentification> getvHobs() {\r
+ return vHobs;\r
+ }\r
+\r
+ public void setvHobs(Vector<HobsIdentification> Hobs) {\r
+ vHobs = Hobs;\r
+ }\r
+\r
+ public Vector<String> getHobsName() {\r
+ Vector<String> v = new Vector<String>();\r
+ for (int index = 0; index < this.vHobs.size(); index++) {\r
+ v.addElement(vHobs.get(index).getName());\r
+ }\r
+ return v;\r
+ }\r
+\r
+ public int size() {\r
+ return this.vHobs.size();\r
+ }\r
+\r
+}\r