3 The file is used to define Build Options 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
.BuildOptions
;
17 import java
.util
.Vector
;
19 public class BuildOptionsVector
{
21 private Vector
<BuildOptionsIdentification
> vBuildOptions
= new Vector
<BuildOptionsIdentification
>();
23 public int findBuildOptions(BuildOptionsIdentification sfi
) {
24 for (int index
= 0; index
< vBuildOptions
.size(); index
++) {
25 if (vBuildOptions
.elementAt(index
).equals(sfi
)) {
32 public int findBuildOptions(String name
) {
33 for (int index
= 0; index
< vBuildOptions
.size(); index
++) {
34 if (vBuildOptions
.elementAt(index
).getOption().equals(name
)) {
41 public BuildOptionsIdentification
getBuildOptions(int index
) {
43 return vBuildOptions
.elementAt(index
);
49 public void addBuildOptions(BuildOptionsIdentification arg0
) {
50 vBuildOptions
.addElement(arg0
);
53 public void setBuildOptions(BuildOptionsIdentification arg0
, int arg1
) {
54 vBuildOptions
.setElementAt(arg0
, arg1
);
57 public void removeBuildOptions(BuildOptionsIdentification arg0
) {
58 int index
= findBuildOptions(arg0
);
60 vBuildOptions
.removeElementAt(index
);
64 public void removeBuildOptions(int index
) {
65 if (index
> -1 && index
< this.size()) {
66 vBuildOptions
.removeElementAt(index
);
70 public Vector
<BuildOptionsIdentification
> getvBuildOptions() {
74 public void setvBuildOptions(Vector
<BuildOptionsIdentification
> BuildOptions
) {
75 vBuildOptions
= BuildOptions
;
78 public Vector
<String
> getBuildOptionsName() {
79 Vector
<String
> v
= new Vector
<String
>();
80 for (int index
= 0; index
< this.vBuildOptions
.size(); index
++) {
81 v
.addElement(vBuildOptions
.get(index
).getOption());
87 return this.vBuildOptions
.size();
90 public Vector
<String
> toStringVector(int index
) {
91 Vector
<String
> v
= new Vector
<String
>();
92 v
.addElement(getBuildOptions(index
).getOption());