50 |
// a REAL kludge |
// a REAL kludge |
51 |
if(dbg) pa("Passed key: "+key); |
if(dbg) pa("Passed key: "+key); |
52 |
key = new Integer( |
key = new Integer( |
53 |
mix(key.hashCode(), |
mix(key.hashCode(), |
54 |
keys[into] != null ? 1 : 0, |
keys[into] != null ? 1 : 0, |
55 |
keys[into] != null ? keys[into].hashCode() : 0)); |
keys[into] != null ? keys[into].hashCode() : 0)); |
56 |
if(dbg) { |
if(dbg) { |
60 |
add(cs, key); |
add(cs, key); |
61 |
} |
} |
62 |
|
|
63 |
public int getCS(Object key) { |
protected int getCSByInt(Object key) { |
64 |
Integer i = (Integer)inds.get(key); |
Integer i = (Integer)inds.get(key); |
65 |
if(i==null) return -1; |
if(i==null) return -1; |
66 |
return i.intValue(); |
return i.intValue(); |
67 |
} |
} |
68 |
|
|
69 |
|
public int getCS(Object key) { |
70 |
|
// XXX ARGH |
71 |
|
return getCSByInt(new Integer(mix(key.hashCode(), 0, 0))); |
72 |
|
} |
73 |
|
|
74 |
public Object getKey(int cs) { |
public Object getKey(int cs) { |
75 |
return keys[cs]; |
return keys[cs]; |
76 |
} |
} |
77 |
|
|
78 |
public int[] interpList(VobMatcher other) { |
public int[] interpList(VobMatcher other0) { |
79 |
|
DefaultVobMatcher other = (DefaultVobMatcher)other0; |
80 |
int[] interpList = new int[maxcs]; |
int[] interpList = new int[maxcs]; |
81 |
for(int i=0; i<maxcs; i++) { |
for(int i=0; i<maxcs; i++) { |
82 |
if(keys[i] == null) continue; // default: zero |
if(keys[i] == null) continue; // default: zero |
83 |
int ind = other.getCS(keys[i]); |
int ind = other.getCSByInt(keys[i]); |
84 |
interpList[i] = ind; |
interpList[i] = ind; |
85 |
} |
} |
86 |
return interpList; |
return interpList; |