]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Hobs/HobsVector.java
3 The file is used to define Package Dependencies Vector
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 package org
.tianocore
.frameworkwizard
.module
.Identifications
.Hobs
;
17 import java
.util
.Vector
;
19 public class HobsVector
{
21 private Vector
<HobsIdentification
> vHobs
= new Vector
<HobsIdentification
>();
23 public int findHobs(HobsIdentification sfi
) {
24 for (int index
= 0; index
< vHobs
.size(); index
++) {
25 if (vHobs
.elementAt(index
).equals(sfi
)) {
32 public int findHobs(String name
) {
33 for (int index
= 0; index
< vHobs
.size(); index
++) {
34 if (vHobs
.elementAt(index
).getName().equals(name
)) {
41 public HobsIdentification
getHobs(int index
) {
43 return vHobs
.elementAt(index
);
49 public void addHobs(HobsIdentification arg0
) {
50 vHobs
.addElement(arg0
);
53 public void setHobs(HobsIdentification arg0
, int arg1
) {
54 vHobs
.setElementAt(arg0
, arg1
);
57 public void removeHobs(HobsIdentification arg0
) {
58 int index
= findHobs(arg0
);
60 vHobs
.removeElementAt(index
);
64 public void removeHobs(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vHobs
.removeElementAt(index
);
70 public Vector
<HobsIdentification
> getvHobs() {
74 public void setvHobs(Vector
<HobsIdentification
> Hobs
) {
78 public Vector
<String
> getHobsName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vHobs
.size(); index
++) {
81 v
.addElement(vHobs
.get(index
).getName());
87 return this.vHobs
.size();
90 public Vector
<String
> toStringVector(int index
) {
91 Vector
<String
> v
= new Vector
<String
>();
92 v
.addElement(getHobs(index
).getName());
93 v
.addElement(getHobs(index
).getType());
94 v
.addElement(getHobs(index
).getUsage());