-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRVInventory.java
More file actions
50 lines (36 loc) · 1.36 KB
/
Copy pathRVInventory.java
File metadata and controls
50 lines (36 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
public class RVInventory {
public List<RV> rvs;
public RVInventory() {
this.rvs = new ArrayList<RV>();
}
public void addRV(RV rv) {
rvs.add(rv);
}
public List<RV> search(
boolean manufacturer_specified,
RVmanufacturerAssociation manufacturer) {
List<RV> matchingRVs = new ArrayList<RV>();
for (Iterator<RV> i = rvs.iterator(); i.hasNext();) {
RV rv = i.next();
/*if (stockNumber_specified) {
if (stockNumber.equals(">")) {
if (!(rv.stockNumberValue() > fiftyPercentStartTimeCriterion_Value)) continue;
} else { // comparison string is "<"
if (!(rv.stockNumberValue() < fiftyPercentStartTimeCriterion_Value)) continue;
}
} */
if (manufacturer_specified) {
if (!(rv.getManufacturer() == manufacturer));
}
matchingRVs.add(rv);
}
// if we get here, then we've checked all the RVs in our inventory and haven't
// found a match. Return null to indicate nothing found.
return matchingRVs;
}
public void addRV( String rVString, String string2, String string3, int i, String string4, int j, int k) {
}
}