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
.DataHubs
;
17 import java
.util
.Vector
;
19 public class DataHubsVector
{
21 private Vector
<DataHubsIdentification
> vDataHubs
= new Vector
<DataHubsIdentification
>();
23 public int findDataHubs(DataHubsIdentification sfi
) {
24 for (int index
= 0; index
< vDataHubs
.size(); index
++) {
25 if (vDataHubs
.elementAt(index
).equals(sfi
)) {
32 public int findDataHubs(String name
) {
33 for (int index
= 0; index
< vDataHubs
.size(); index
++) {
34 if (vDataHubs
.elementAt(index
).getName().equals(name
)) {
41 public DataHubsIdentification
getDataHubs(int index
) {
43 return vDataHubs
.elementAt(index
);
49 public void addDataHubs(DataHubsIdentification arg0
) {
50 vDataHubs
.addElement(arg0
);
53 public void updateDataHubs(DataHubsIdentification arg0
, int arg1
) {
54 vDataHubs
.setElementAt(arg0
, arg1
);
57 public void removeDataHubs(DataHubsIdentification arg0
) {
58 int index
= findDataHubs(arg0
);
60 vDataHubs
.removeElementAt(index
);
64 public void removeDataHubs(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vDataHubs
.removeElementAt(index
);
70 public Vector
<DataHubsIdentification
> getvDataHubs() {
74 public void setvDataHubs(Vector
<DataHubsIdentification
> DataHubs
) {
78 public Vector
<String
> getDataHubsName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vDataHubs
.size(); index
++) {
81 v
.addElement(vDataHubs
.get(index
).getName());
87 return this.vDataHubs
.size();