-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProductRow.java
More file actions
47 lines (40 loc) · 829 Bytes
/
Copy pathProductRow.java
File metadata and controls
47 lines (40 loc) · 829 Bytes
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
import java.util.ArrayList;
public class ProductRow {
public ArrayList<String> tnl;
public ArrayList<RowInfo> ril;
public ProductRow()
{
tnl = new ArrayList<String>();
ril = new ArrayList<RowInfo>();
}
public void concat(String tn, RowInfo ri)
{
tnl.add(tn);
ril.add(ri);
}
public ProductRow(String tn, RowInfo ri)
{
tnl = new ArrayList<String>();
ril = new ArrayList<RowInfo>();
concat(tn, ri);
}
public String toString()
{
String ret = "ProductRow(" + Integer.toString(tnl.size()) + ")[";
for(int i=0; i<tnl.size(); i++)
{
ret += tnl.get(i) + "." + ril.get(i) + ", ";
}
ret += "]";
return ret;
}
public ProductRow clone()
{
ProductRow newpr = new ProductRow();
for (int i=0; i<tnl.size(); i++)
{
newpr.concat(tnl.get(i), ril.get(i));
}
return newpr;
}
}