// (c): Tuomas J. Lukka package gzz.index.impl; import gzz.index.*; import gzz.media.*; /** An index of xanadu links. */ public class XuIndexer { EnfiladeOverlapIndex f = new EnfiladeOverlapIndex(), b = new EnfiladeOverlapIndex(); /** Get an Index which, for Enfilade1Ds, * returns all XuLink objects where * the given enfilade overlaps the from * member. */ public Index getForwardIndex() { return f; } public Index getBackwardIndex() { return b; } public void add(XuLink link) { f.set(link, link.from); b.set(link, link.to); } /** Remove a link. * Note that since we don't have equivalence classes between * links yet, this must be a XuLink that's really inside this * object, either inserted through add() or obtained through * an index. */ public void remove(XuLink link) { f.set(link, null); b.set(link, null); } }