3 The file is used to define Source Files 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.
16 package org
.tianocore
.frameworkwizard
.module
.Identifications
.SourceFiles
;
18 import java
.util
.Vector
;
20 public class SourceFilesVector
{
21 private Vector
<SourceFilesIdentification
> vSourceFiles
= new Vector
<SourceFilesIdentification
>();
23 public int findSourceFiles(SourceFilesIdentification sfi
) {
24 for (int index
= 0; index
< vSourceFiles
.size(); index
++) {
25 if (vSourceFiles
.elementAt(index
).equals(sfi
)) {
32 public int findSourceFiles(String name
) {
33 for (int index
= 0; index
< vSourceFiles
.size(); index
++) {
34 if (vSourceFiles
.elementAt(index
).getFilename().equals(name
)) {
41 public SourceFilesIdentification
getSourceFiles(int index
) {
43 return vSourceFiles
.elementAt(index
);
49 public void addSourceFiles(SourceFilesIdentification sfi
) {
50 vSourceFiles
.addElement(sfi
);
53 public void setSourceFiles(SourceFilesIdentification sfi
, int index
) {
54 vSourceFiles
.setElementAt(sfi
, index
);
57 public void removeSourceFiles(SourceFilesIdentification sfi
) {
58 int index
= findSourceFiles(sfi
);
60 vSourceFiles
.removeElementAt(index
);
64 public void removeSourceFiles(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vSourceFiles
.removeElementAt(index
);
70 public Vector
<SourceFilesIdentification
> getvSourceFiles() {
74 public void setvSourceFiles(Vector
<SourceFilesIdentification
> SourceFiles
) {
75 vSourceFiles
= SourceFiles
;
78 public Vector
<String
> getSourceFilesName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vSourceFiles
.size(); index
++) {
81 v
.addElement(vSourceFiles
.get(index
).getFilename());
87 return this.vSourceFiles
.size();
90 public Vector
<String
> toStringVector(int index
) {
91 Vector
<String
> v
= new Vector
<String
>();
92 v
.addElement(getSourceFiles(index
).getFilename());