/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
this.keyComparator = keyComparator; init();
this.keyComparator = keyComparator; init();
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
/** * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e., * deserialize it). */ private void readObject(final java.io.ObjectInputStream s) throws IOException, ClassNotFoundException { // Read in the threshold, loadfactor, and any hidden stuff s.defaultReadObject(); // Read in number of buckets and allocate the bucket array; final int numBuckets = s.readInt(); table = new Entry[numBuckets]; init(); // Give subclass a chance to do its thing. // Read in ss (number of Mappings) final int ss = s.readInt(); // Read the keys and values, and put the mappings in the HashMap for (int i = 0; i < ss; i++) { final K key = (K) s.readObject(); final V value = (V) s.readObject(); putForCreate(key, value); } }
this.keyComparator = keyComparator; init();
this.keyComparator = keyComparator; init();
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
this.keyComparator = keyComparator; init();
this.keyComparator = keyComparator; init();
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }
/** * Returns a shallow copy of this <tt>HashMap</tt> instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map. */ @Override public Object clone() { KeyComparatorHashMap<K, V> result = null; try { result = (KeyComparatorHashMap<K, V>) super.clone(); result.table = new Entry[table.length]; result.entrySet = null; result.modCount = 0; result.size = 0; result.init(); result.putAllForCreate(this); } catch (final CloneNotSupportedException e) { // assert false; } return result; }