/[gzz]/gzz/gzz/vob/DefaultVobMatcher.java
ViewVC logotype

Diff of /gzz/gzz/vob/DefaultVobMatcher.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Wed Sep 25 14:46:12 2002 UTC revision 1.2 by benja, Wed Sep 25 18:18:51 2002 UTC
# Line 50  public class DefaultVobMatcher implement Line 50  public class DefaultVobMatcher implement
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) {
# Line 60  public class DefaultVobMatcher implement Line 60  public class DefaultVobMatcher implement
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;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26