void putAllForCreate(IntHashMap<V> m) { for (Iterator<Entry<V>> i = m.entrySet().iterator(); i.hasNext();) { Entry<V> e = i.next(); putForCreate(e.getKey(), e.getValue()); } }
void putAllForCreate(IntHashMap m) { for (Iterator i = m.entrySet().iterator(); i.hasNext();) { Entry e = (Entry)i.next(); putForCreate(e.getKey(), e.getValue()); } }
/** * Save the state of the <tt>HashMap</tt> instance to a stream (i.e., serialize it). * * @param s * The ObjectOutputStream * @throws IOException * * @serialData The <i>capacity</i> of the HashMap (the length of the bucket array) is emitted * (int), followed by the <i>size</i> of the HashMap (the number of key-value * mappings), followed by the key (Object) and value (Object) for each key-value * mapping represented by the HashMap The key-value mappings are emitted in the * order that they are returned by <tt>entrySet().iterator()</tt>. * */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Write out the threshold, loadfactor, and any hidden stuff s.defaultWriteObject(); // Write out number of buckets s.writeInt(table.length); // Write out size (number of Mappings) s.writeInt(size); // Write out keys and values (alternating) for (Iterator<Entry<V>> i = entrySet().iterator(); i.hasNext();) { Entry<V> e = i.next(); s.writeInt(e.getKey()); s.writeObject(e.getValue()); } }
/** * Save the state of the <tt>HashMap</tt> instance to a stream (i.e., serialize it). * * @param s * The ObjectOutputStream * @throws IOException * * @serialData The <i>capacity</i> of the HashMap (the length of the bucket array) is emitted * (int), followed by the <i>size</i> of the HashMap (the number of key-value * mappings), followed by the key (Object) and value (Object) for each key-value * mapping represented by the HashMap The key-value mappings are emitted in the * order that they are returned by <tt>entrySet().iterator()</tt>. * */ private void writeObject(final java.io.ObjectOutputStream s) throws IOException { // Write out the threshold, loadfactor, and any hidden stuff s.defaultWriteObject(); // Write out number of buckets s.writeInt(table.length); // Write out size (number of Mappings) s.writeInt(size); // Write out keys and values (alternating) for (Entry<V> entry : entrySet()) { s.writeInt(entry.getKey()); s.writeObject(entry.getValue()); } }
/** * Save the state of the <tt>HashMap</tt> instance to a stream (i.e., serialize it). * * @param s * The ObjectOutputStream * @throws IOException * * @serialData The <i>capacity</i> of the HashMap (the length of the bucket array) is emitted * (int), followed by the <i>size</i> of the HashMap (the number of key-value * mappings), followed by the key (Object) and value (Object) for each key-value * mapping represented by the HashMap The key-value mappings are emitted in the * order that they are returned by <tt>entrySet().iterator()</tt>. * */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Write out the threshold, loadfactor, and any hidden stuff s.defaultWriteObject(); // Write out number of buckets s.writeInt(table.length); // Write out size (number of Mappings) s.writeInt(size); // Write out keys and values (alternating) for (Iterator i = entrySet().iterator(); i.hasNext();) { Entry e = (Entry)i.next(); s.writeInt(e.getKey()); s.writeObject(e.getValue()); } }
private void writeObject(java.io.ObjectOutputStream s) throws IOException { IntKeyWeakReference ref = null; while ((ref = (IntKeyWeakReference)queue.poll()) != null) { directComponentRefs.remove(ref.uid); } s.defaultWriteObject(); s.writeInt(directComponentRefs.size()); Iterator it = directComponentRefs.entrySet().iterator(); while (it.hasNext()) { IntHashMap.Entry entry = (Entry)it.next(); s.writeInt(entry.getKey()); ComponentAndInterface cai = (ComponentAndInterface)entry.getValue(); s.writeObject(cai.getComponent()); s.writeUTF(cai.getInterfaceName()); } } }
Iterator<IntHashMap.Entry<ComponentAndInterface>> it = directComponentRefs.entrySet() .iterator(); while (it.hasNext())
void putAllForCreate(final IntHashMap<V> m) { for (Entry<V> entry : m.entrySet()) { putForCreate(entry.getKey(), entry.getValue()); } }
for (Iterator<Entry<V>> i = m.entrySet().iterator(); i.hasNext();)
for (Iterator i = m.entrySet().iterator(); i.hasNext();)
Iterator it = directComponentRefs.entrySet().iterator(); while (it.hasNext())
Iterator<IntHashMap.Entry<ComponentAndInterface>> it = directComponentRefs.entrySet() .iterator(); while (it.hasNext())
for (Entry<V> entry : m.entrySet())