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
.Externs
;
17 import java
.util
.Vector
;
19 public class ExternsVector
{
21 private Vector
<ExternsIdentification
> vExterns
= new Vector
<ExternsIdentification
>();
23 public int findExterns(ExternsIdentification sfi
) {
24 for (int index
= 0; index
< vExterns
.size(); index
++) {
25 if (vExterns
.elementAt(index
).equals(sfi
)) {
32 public int findExterns(String name
) {
33 for (int index
= 0; index
< vExterns
.size(); index
++) {
34 if (vExterns
.elementAt(index
).getName().equals(name
)) {
41 public ExternsIdentification
getExterns(int index
) {
43 return vExterns
.elementAt(index
);
49 public void addExterns(ExternsIdentification arg0
) {
50 vExterns
.addElement(arg0
);
53 public void updateExterns(ExternsIdentification arg0
, int arg1
) {
54 vExterns
.setElementAt(arg0
, arg1
);
57 public void removeExterns(ExternsIdentification arg0
) {
58 int index
= findExterns(arg0
);
60 vExterns
.removeElementAt(index
);
64 public void removeExterns(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vExterns
.removeElementAt(index
);
70 public Vector
<ExternsIdentification
> getvExterns() {
74 public void setvExterns(Vector
<ExternsIdentification
> Externs
) {
78 public Vector
<String
> getExternsName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vExterns
.size(); index
++) {
81 v
.addElement(vExterns
.get(index
).getName());
87 return this.vExterns
.size();