]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdVector.java
3 The file is used to define Pcd 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
.PcdCoded
;
17 import java
.util
.Vector
;
19 public class PcdVector
{
21 private Vector
<PcdIdentification
> vPcd
= new Vector
<PcdIdentification
>();
23 public int findPcd(PcdIdentification sfi
) {
24 for (int index
= 0; index
< vPcd
.size(); index
++) {
25 if (vPcd
.elementAt(index
).equals(sfi
)) {
32 public int findPcd(String name
) {
33 for (int index
= 0; index
< vPcd
.size(); index
++) {
34 if (vPcd
.elementAt(index
).getName().equals(name
)) {
41 public PcdIdentification
getPcd(int index
) {
43 return vPcd
.elementAt(index
);
49 public void addPcd(PcdIdentification arg0
) {
50 vPcd
.addElement(arg0
);
53 public void setPcd(PcdIdentification arg0
, int arg1
) {
54 vPcd
.setElementAt(arg0
, arg1
);
57 public void removePcd(PcdIdentification arg0
) {
58 int index
= findPcd(arg0
);
60 vPcd
.removeElementAt(index
);
64 public void removePcd(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vPcd
.removeElementAt(index
);
70 public Vector
<PcdIdentification
> getvPcd() {
74 public void setvPcd(Vector
<PcdIdentification
> Pcd
) {
78 public Vector
<String
> getPcdName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vPcd
.size(); index
++) {
81 v
.addElement(vPcd
.get(index
).getName());
87 return this.vPcd
.size();
90 public void addAll(PcdVector v
) {
92 for (int index
= 0; index
< v
.size(); index
++) {
93 vPcd
.add(v
.getPcd(index
));