56 |
return parent == k.parent && key.equals(k.key); |
return parent == k.parent && key.equals(k.key); |
57 |
} |
} |
58 |
public String toString() { |
public String toString() { |
59 |
return "DefaultVobMatcher key: "+key+" parent: "+parent; |
return "[DefaultVobMatcher key: "+key+" parent: "+parent+"]"; |
60 |
} |
} |
61 |
} |
} |
62 |
void ensure(int n) { |
void ensure(int n) { |
90 |
} |
} |
91 |
public int add(int into, int cs, Object key) { |
public int add(int into, int cs, Object key) { |
92 |
ensure(cs); |
ensure(cs); |
93 |
|
if(cs < 0) |
94 |
|
throw new Error("Trying to add negative parent!"); |
95 |
if(key == null) key = NULL; |
if(key == null) key = NULL; |
96 |
|
|
97 |
if (dbg) checkIfKeyAlreadyExist(new Key(key, into)); |
if (dbg) checkIfKeyAlreadyExist(new Key(key, into)); |
192 |
} |
} |
193 |
} |
} |
194 |
|
|
195 |
if(k.parent < 0 || k.parent >= i) |
if(k.parent < 0 || k.parent >= i) { |
196 |
throw new Error("argh "+k.parent); |
dumpSimply(); |
197 |
|
throw new Error("Got an invalid parent for "+i+" "+k.parent); |
198 |
|
} |
199 |
|
|
200 |
// XXX assumes that parent is set already |
// XXX assumes that parent is set already |
201 |
int other_parent = interpList[k.parent]; |
int other_parent = interpList[k.parent]; |
318 |
pa(i + " : Real NULL"); |
pa(i + " : Real NULL"); |
319 |
} |
} |
320 |
} |
} |
321 |
|
|
322 |
|
public void dumpSimply() { |
323 |
|
for(int i=1; i<maxcs+1; i++) { |
324 |
|
if(keyByCs[i] != null) |
325 |
|
pa(i+" "+keyByCs[i]); |
326 |
|
} |
327 |
|
} |
328 |
} |
} |