01: package tijmp;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: public class OwnerInfoHeader {
07: private long ownedTag;
08: private List<OwnerInfo> owners = new ArrayList<OwnerInfo>();
09:
10: public OwnerInfoHeader(long ownedTag) {
11: this .ownedTag = ownedTag;
12: }
13:
14: public void addOwner(long ownerTag, byte referenceType, int index) {
15: owners.add(new OwnerInfo(ownerTag, referenceType, index));
16: }
17:
18: public Iterable<OwnerInfo> getOwners() {
19: return owners;
20: }
21:
22: public OwnerInfo getOwnerInfo(int i) {
23: return owners.get(i);
24: }
25:
26: public long[] getOwnerTags() {
27: long[] ls = new long[owners.size()];
28: for (int i = 0; i < ls.length; i++)
29: ls[i] = owners.get(i).getOwnerTag();
30: return ls;
31: }
32: }
|