private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }
public Object put(int key, Object value) { int length = this.keyTable.length, index = key % length; int currentKey; while ((currentKey = this.keyTable[index]) != 0) { if (currentKey == key) return this.valueTable[index] = value; if (++index == length) { index = 0; } } this.keyTable[index] = key; this.valueTable[index] = value; // assumes the threshold is never equal to the size of the table if (++this.elementSize > this.threshold) rehash(); return value; } private void rehash() {
private void rehash() { HashtableOfInt newHashtable = new HashtableOfInt(this.elementSize * 2); // double the number of expected elements int currentKey; for (int i = this.keyTable.length; --i >= 0;) if ((currentKey = this.keyTable[i]) != 0) newHashtable.put(currentKey, this.valueTable[i]); this.keyTable = newHashtable.keyTable; this.valueTable = newHashtable.valueTable; this.threshold = newHashtable.threshold; } public int size() {
private String getFieldName(int id) { int key2 = id & IProblem.IgnoreCategoriesMask; if (key2 == 0) { key2 = Integer.MAX_VALUE; } return (String) Logger.FIELD_TABLE.get(key2); }