6 |
|
|
7 |
/** An index of xanadu links. |
/** An index of xanadu links. |
8 |
*/ |
*/ |
9 |
public class XuIndexer { |
public interface XuIndexer { |
10 |
EnfiladeOverlapIndex |
/** Get an Index which, for Enfilade1Ds, |
|
f = new EnfiladeOverlapIndex(), |
|
|
b = new EnfiladeOverlapIndex(); |
|
|
/** Get an Index which, for Enfilade1Ds, |
|
11 |
* returns all XuLink objects where |
* returns all XuLink objects where |
12 |
* the given enfilade overlaps the from |
* the given enfilade overlaps the from |
13 |
* member. |
* member. |
14 |
*/ |
*/ |
15 |
public Index getForwardIndex() { return f; } |
Index getForwardIndex(); |
16 |
public Index getBackwardIndex() { return b; } |
Index getBackwardIndex(); |
17 |
|
|
18 |
|
void add(XuLink link); |
19 |
|
|
|
public void add(XuLink link) { |
|
|
f.set(link, link.from); |
|
|
b.set(link, link.to); |
|
|
} |
|
20 |
/** Remove a link. |
/** Remove a link. |
21 |
* Note that since we don't have equivalence classes between |
* Note that since we don't have equivalence classes between |
22 |
* links yet, this must be a XuLink that's really inside this |
* links yet, this must be a XuLink that's really inside this |
23 |
* object, either inserted through add() or obtained through |
* object, either inserted through add() or obtained through |
24 |
* an index. |
* an index. |
25 |
*/ |
*/ |
26 |
public void remove(XuLink link) { |
public void remove(XuLink link); |
|
f.set(link, null); |
|
|
b.set(link, null); |
|
|
} |
|
27 |
} |
} |