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
.Identification
.Ppis
;
17 import java
.util
.Vector
;
19 public class PpisVector
{
21 private Vector
<PpisIdentification
> vPpis
= new Vector
<PpisIdentification
>();
23 public int findPpis(PpisIdentification sfi
) {
24 for (int index
= 0; index
< vPpis
.size(); index
++) {
25 if (vPpis
.elementAt(index
).equals(sfi
)) {
32 public int findPpis(String name
) {
33 for (int index
= 0; index
< vPpis
.size(); index
++) {
34 if (vPpis
.elementAt(index
).getName().equals(name
)) {
41 public PpisIdentification
getPpis(int index
) {
43 return vPpis
.elementAt(index
);
49 public void addPpis(PpisIdentification arg0
) {
50 vPpis
.addElement(arg0
);
53 public void updatePpis(PpisIdentification arg0
, int arg1
) {
54 vPpis
.setElementAt(arg0
, arg1
);
57 public void removePpis(PpisIdentification arg0
) {
58 int index
= findPpis(arg0
);
60 vPpis
.removeElementAt(index
);
64 public void removePpis(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vPpis
.removeElementAt(index
);
70 public Vector
<PpisIdentification
> getvPpis() {
74 public void setvPpis(Vector
<PpisIdentification
> Ppis
) {
78 public Vector
<String
> getPpisName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vPpis
.size(); index
++) {
81 v
.addElement(vPpis
.get(index
).getName());
87 return this.vPpis
.size();