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 package org.otvl.sbxbsamp.abcref;
31
32
33
34
35
36
37
38 /***
39 *
40 * @author
41 * @version
42 */
43
44
45 public class BRefee
46 extends BaseRefee
47
48 {
49
50
51
52 /***
53 *
54 */
55 private String sid;
56
57
58
59
60
61 /***
62 *
63 */
64 private java.util.List cByRef = new java.util.ArrayList() ;
65
66
67
68
69
70 /***
71 * Provides a unique reference for the current object.
72 * The class implementing the reference must implement hashcode/equals.
73 * @return Object
74 */
75 protected Object doGetReference()
76 {
77 Object vDoGetReference;
78
79 vDoGetReference = new ABCRef(getClass(),"" + sid);
80 return vDoGetReference;
81
82 }
83 /***
84 * Called when a reference has been instantiated and updated after successful parsing.
85 * May be implemented by a referencee to update its state from the state of the reference.
86 * @param ref
87 */
88 public void doSetSbxbReference(
89 Object ref
90 )
91 {
92
93 ABCRef rr = (ABCRef)ref;
94 sid = rr.id;
95
96 }
97
98
99
100
101
102
103
104
105 /***
106 * Returns the sid.<br/>
107 *
108 * @return String
109 */
110 public String getSid() {
111 String vSid = sid;
112 return vSid;
113 }
114
115 /***
116 * Sets the sid.<br/>
117 *
118 * @param sid The sid to set
119 */
120 public void setSid(String sid) {
121 this.sid = sid;
122 }
123
124
125
126
127
128
129
130
131
132 /***
133 * Returns a target in link cByRef.<br/>
134 *
135 * @param index offset in the array
136 * @return CRefee
137 */
138 public CRefee getCByRef(int index) {
139 CRefee vCByRef = (CRefee)cByRef.get(index);
140 return vCByRef;
141 }
142 /***
143 * Returns an iterator for targets in links cByRef
144 * @return java.util.Iterator
145 */
146 public java.util.Iterator iteratorCByRef() {
147 java.util.Iterator vIterator = cByRef.iterator();
148 return vIterator;
149 }
150 /***
151 * Returns the size of the collection cByRef
152 * @return int
153 */
154 public int sizeCByRef() {
155 int vSize = cByRef.size();
156 return vSize;
157 }
158
159 /***
160 * Inserts a target in link cByRef.<br/>
161 *
162 * @param index offset in the list
163 * @param aCRefee The CRefee to insert
164 */
165 public void addCByRef(int index, CRefee aCRefee) {
166 this.cByRef.add(index, aCRefee);
167 }
168 /***
169 * Adds a target at end of link cByRef.<br/>
170 *
171 * @param aCRefee The CRefee to insert
172 */
173 public void addCByRef(CRefee aCRefee) {
174 this.cByRef.add(this.cByRef.size(), aCRefee);
175 }
176
177 /***
178 * Removes a target in link cByRef
179 * @param index offset in the list
180 */
181 public void removeCByRef(int index) {
182 this.cByRef.remove(index);
183 }
184
185 /***
186 * Clears all targets in link cByRef
187 */
188 public void clearCByRef() {
189 this.cByRef.clear();
190 }
191
192
193
194
195 }