268 |
return getList().hashCode(); |
return getList().hashCode(); |
269 |
} |
} |
270 |
|
|
271 |
|
/** Return true if this enfilade intersects |
272 |
|
* (span-wise) the other one. |
273 |
|
* XXX Implemented using a really slow, bad algorithm. |
274 |
|
*/ |
275 |
|
public boolean intersects(Enfilade1D other0) { |
276 |
|
Enfilade1DImpl other = (Enfilade1DImpl)other0; |
277 |
|
if(middle != null && other.intersects(middle)) |
278 |
|
return true; |
279 |
|
if(left != null && left.intersects(other)) |
280 |
|
return true; |
281 |
|
if(right != null && right.intersects(other)) |
282 |
|
return true; |
283 |
|
return false; |
284 |
|
} |
285 |
|
|
286 |
|
/** Return true if this enfilade intersects |
287 |
|
* (span-wise) the given span. |
288 |
|
* XXX Implemented using a really slow, bad algorithm. |
289 |
|
*/ |
290 |
|
public boolean intersects(Span s) { |
291 |
|
if(middle != null && middle.intersects(s)) |
292 |
|
return true; |
293 |
|
if(left != null && left.intersects(s)) |
294 |
|
return true; |
295 |
|
if(right != null && right.intersects(s)) |
296 |
|
return true; |
297 |
|
return false; |
298 |
|
} |
299 |
|
|
300 |
public Enfilade1D optimized() { |
public Enfilade1D optimized() { |
301 |
// brute force-- regenerate all... |
// brute force-- regenerate all... |
302 |
List l = getList(); |
List l = getList(); |