]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java
1. Restructure some folders and files
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / Identifications / Guids / GuidsVector.java
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Guids/GuidsVector.java
new file mode 100644 (file)
index 0000000..01694cc
--- /dev/null
@@ -0,0 +1,90 @@
+/** @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.Guids;\r
+\r
+import java.util.Vector;\r
+\r
+public class GuidsVector {\r
+\r
+    private Vector<GuidsIdentification> vGuids = new Vector<GuidsIdentification>();\r
+\r
+    public int findGuids(GuidsIdentification sfi) {\r
+        for (int index = 0; index < vGuids.size(); index++) {\r
+            if (vGuids.elementAt(index).equals(sfi)) {\r
+                return index;\r
+            }\r
+        }\r
+        return -1;\r
+    }\r
+\r
+    public int findGuids(String name) {\r
+        for (int index = 0; index < vGuids.size(); index++) {\r
+            if (vGuids.elementAt(index).getName().equals(name)) {\r
+                return index;\r
+            }\r
+        }\r
+        return -1;\r
+    }\r
+\r
+    public GuidsIdentification getGuids(int index) {\r
+        if (index > -1) {\r
+            return vGuids.elementAt(index);\r
+        } else {\r
+            return null;\r
+        }\r
+    }\r
+\r
+    public void addGuids(GuidsIdentification arg0) {\r
+        vGuids.addElement(arg0);\r
+    }\r
+\r
+    public void updateGuids(GuidsIdentification arg0, int arg1) {\r
+        vGuids.setElementAt(arg0, arg1);\r
+    }\r
+\r
+    public void removeGuids(GuidsIdentification arg0) {\r
+        int index = findGuids(arg0);\r
+        if (index > -1) {\r
+            vGuids.removeElementAt(index);\r
+        }\r
+    }\r
+\r
+    public void removeGuids(int index) {\r
+        if (index > -1 && index < this.size()) {\r
+            vGuids.removeElementAt(index);\r
+        }\r
+    }\r
+\r
+    public Vector<GuidsIdentification> getvGuids() {\r
+        return vGuids;\r
+    }\r
+\r
+    public void setvGuids(Vector<GuidsIdentification> Guids) {\r
+        vGuids = Guids;\r
+    }\r
+\r
+    public Vector<String> getGuidsName() {\r
+        Vector<String> v = new Vector<String>();\r
+        for (int index = 0; index < this.vGuids.size(); index++) {\r
+            v.addElement(vGuids.get(index).getName());\r
+        }\r
+        return v;\r
+    }\r
+\r
+    public int size() {\r
+        return this.vGuids.size();\r
+    }\r
+\r
+}\r