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
.PcdCoded
;
17 import java
.util
.Vector
;
19 public class PcdCodedVector
{
21 private Vector
<PcdCodedIdentification
> vPcdCoded
= new Vector
<PcdCodedIdentification
>();
23 public int findPcdCoded(PcdCodedIdentification sfi
) {
24 for (int index
= 0; index
< vPcdCoded
.size(); index
++) {
25 if (vPcdCoded
.elementAt(index
).equals(sfi
)) {
32 public int findPcdCoded(String name
) {
33 for (int index
= 0; index
< vPcdCoded
.size(); index
++) {
34 if (vPcdCoded
.elementAt(index
).getName().equals(name
)) {
41 public PcdCodedIdentification
getPcdCoded(int index
) {
43 return vPcdCoded
.elementAt(index
);
49 public void addPcdCoded(PcdCodedIdentification arg0
) {
50 vPcdCoded
.addElement(arg0
);
53 public void updatePcdCoded(PcdCodedIdentification arg0
, int arg1
) {
54 vPcdCoded
.setElementAt(arg0
, arg1
);
57 public void removePcdCoded(PcdCodedIdentification arg0
) {
58 int index
= findPcdCoded(arg0
);
60 vPcdCoded
.removeElementAt(index
);
64 public void removePcdCoded(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vPcdCoded
.removeElementAt(index
);
70 public Vector
<PcdCodedIdentification
> getvPcdCoded() {
74 public void setvPcdCoded(Vector
<PcdCodedIdentification
> PcdCoded
) {
78 public Vector
<String
> getPcdCodedName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vPcdCoded
.size(); index
++) {
81 v
.addElement(vPcdCoded
.get(index
).getName());
87 return this.vPcdCoded
.size();