public Hashtable(int capacity) {if (capacity < 0) {throw new IllegalArgumentException("Capacity: " + capacity);}if (capacity == 0) {@SuppressWarnings("unchecked")HashtableEntry<K, V>[] tab = (HashtableEntry<K, V>[]) EMPTY_TABLE;table = tab;threshold = -1; return;}if (capacity < MINIMUM_CAPACITY) {capacity = MINIMUM_CAPACITY;} else if (capacity > MAXIMUM_CAPACITY) {capacity = MAXIMUM_CAPACITY;} else {capacity = roundUpToPowerOfTwo(capacity);}makeTable(capacity);}
public Hashtable(int capacity){if (capacity < 0){throw new System.ArgumentException("Capacity: " + capacity);}if (capacity == 0){java.util.Hashtable.HashtableEntry<K, V>[] tab = (java.util.Hashtable.HashtableEntry<K, V>[])EMPTY_TABLE;table = tab;threshold = -1;return;}if (capacity < java.util.Hashtable.MINIMUM_CAPACITY){capacity = java.util.Hashtable.MINIMUM_CAPACITY;}else{if (capacity > java.util.Hashtable.MAXIMUM_CAPACITY){capacity = java.util.Hashtable.MAXIMUM_CAPACITY;}else{capacity = roundUpToPowerOfTwo(capacity);}}makeTable(capacity);}