// would repeatedly re-lock/release the monitor, we directly use the
// unsynchronized EntryIterator instead.
Iterator<Map.Entry<K, V>> entries = new EntryIterator();
- StringBuffer r = new StringBuffer("{");
+ StringBuilder r = new StringBuilder("{");
for (int pos = size; pos > 0; pos--)
{
r.append(entries.next());
* <code>next()</code> gives a different result, by returning just
* the key rather than the whole element.
*/
- private EntryIterator iterator;
+ private final EntryIterator iterator;
/**
* Construct a new KeyIterator
* <code>next()</code> gives a different result, by returning just
* the value rather than the whole element.
*/
- private EntryIterator iterator;
+ private final EntryIterator iterator;
/**
* Construct a new KeyIterator
* <code>nextElement()</code> gives a different result, by returning just
* the key rather than the whole element.
*/
- private EntryEnumerator enumerator;
+ private final EntryEnumerator enumerator;
/**
* Construct a new KeyEnumerator
* <code>nextElement()</code> gives a different result, by returning just
* the value rather than the whole element.
*/
- private EntryEnumerator enumerator;
+ private final EntryEnumerator enumerator;
/**
* Construct a new ValueEnumerator