]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/SystemTables/SystemTablesVector.java
Use table and popup window to add/edit all elements of module instead of original...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / Identifications / SystemTables / SystemTablesVector.java
CommitLineData
a13899c5 1/** @file\r
2 \r
3 The file is used to define Package Dependencies Vector\r
4 \r
5 Copyright (c) 2006, Intel Corporation\r
6 All rights reserved. This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10 \r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13 \r
14 **/\r
79cb6fdb 15package org.tianocore.frameworkwizard.module.Identifications.SystemTables;\r
a13899c5 16\r
17import java.util.Vector;\r
18\r
19public class SystemTablesVector {\r
20\r
21 private Vector<SystemTablesIdentification> vSystemTables = new Vector<SystemTablesIdentification>();\r
22\r
23 public int findSystemTables(SystemTablesIdentification sfi) {\r
24 for (int index = 0; index < vSystemTables.size(); index++) {\r
25 if (vSystemTables.elementAt(index).equals(sfi)) {\r
26 return index;\r
27 }\r
28 }\r
29 return -1;\r
30 }\r
31\r
32 public int findSystemTables(String name) {\r
33 for (int index = 0; index < vSystemTables.size(); index++) {\r
34 if (vSystemTables.elementAt(index).getName().equals(name)) {\r
35 return index;\r
36 }\r
37 }\r
38 return -1;\r
39 }\r
40\r
41 public SystemTablesIdentification getSystemTables(int index) {\r
42 if (index > -1) {\r
43 return vSystemTables.elementAt(index);\r
44 } else {\r
45 return null;\r
46 }\r
47 }\r
48\r
49 public void addSystemTables(SystemTablesIdentification arg0) {\r
50 vSystemTables.addElement(arg0);\r
51 }\r
52\r
06a19cee 53 public void setSystemTables(SystemTablesIdentification arg0, int arg1) {\r
a13899c5 54 vSystemTables.setElementAt(arg0, arg1);\r
55 }\r
56\r
57 public void removeSystemTables(SystemTablesIdentification arg0) {\r
58 int index = findSystemTables(arg0);\r
59 if (index > -1) {\r
60 vSystemTables.removeElementAt(index);\r
61 }\r
62 }\r
63\r
64 public void removeSystemTables(int index) {\r
65 if (index > -1 && index < this.size()) {\r
66 vSystemTables.removeElementAt(index);\r
67 }\r
68 }\r
69\r
70 public Vector<SystemTablesIdentification> getvSystemTables() {\r
71 return vSystemTables;\r
72 }\r
73\r
74 public void setvSystemTables(Vector<SystemTablesIdentification> SystemTables) {\r
75 vSystemTables = SystemTables;\r
76 }\r
77\r
78 public Vector<String> getSystemTablesName() {\r
79 Vector<String> v = new Vector<String>();\r
80 for (int index = 0; index < this.vSystemTables.size(); index++) {\r
81 v.addElement(vSystemTables.get(index).getName());\r
82 }\r
83 return v;\r
84 }\r
85\r
86 public int size() {\r
87 return this.vSystemTables.size();\r
88 }\r
06a19cee 89 \r
90 public Vector<String> toStringVector(int index) {\r
91 Vector<String> v = new Vector<String>();\r
92 v.addElement(getSystemTables(index).getName());\r
93 v.addElement(getSystemTables(index).getUsage());\r
94 return v;\r
95 }\r
a13899c5 96}\r