+ /**
+ * Compares two tables. Ignores table initialization.
+ */
+ @Override
+ public int compareTo(final Table o) {
+ if (usedEntries < o.usedEntries)
+ return -1;
+ if (usedEntries > o.usedEntries)
+ return 1;
+
+ for (int i = 0; i < usedEntries; i++) {
+ if (range[i] < o.range[i])
+ return -1;
+ if (range[i] > o.range[i])
+ return 1;
+
+ if (switchTreshold[i] < o.switchTreshold[i])
+ return -1;
+ if (switchTreshold[i] > o.switchTreshold[i])
+ return 1;
+
+ if (bitcount[i] < o.bitcount[i])
+ return -1;
+ if (bitcount[i] > o.bitcount[i])
+ return 1;
+ }