108 lines
3.1 KiB
HTML
108 lines
3.1 KiB
HTML
<title>RELEASE NOTES: COLLECTIONS 3.0</title>
|
|
|
|
<center><h2>RELEASE NOTES: COLLECTIONS 3.0</h2></center>
|
|
|
|
<p><i>Collections 3.0</i> includes a significant number of new collections
|
|
in addition to various bug fixes and refactoring changes. The major additions
|
|
are:
|
|
</p>
|
|
<ul>
|
|
<li><strong>Buffers</strong> - A new collection interface for queues and
|
|
queue-like things.</li>
|
|
<li><strong>Decorators</strong> - A group of static utility classes that provide
|
|
decorators for other collections</li>
|
|
</ul>
|
|
<p>
|
|
The decorators are found on classes named <code>XxxUtils</code> where Xxx is the
|
|
collection type. The decorators are:
|
|
</p>
|
|
<ul>
|
|
<li><strong>Synchronized</strong> - Synchronized decorators where not provided
|
|
by <code>Collections</code>.</li>
|
|
<li><strong>Unmodifiable</strong> - Unmodifiable decorators where not provided
|
|
by <code>Collections</code>.</li>
|
|
<li><strong>Predicated</strong> - Decorators that only allow the addition of an
|
|
element to the collection if it matches a <code>Predicate</code>.</li>
|
|
<li><strong>FixedSize</strong> - Decorators that ensure that the list/map
|
|
cannot change size.</li>
|
|
<li><strong>Lazy</strong> - Decorators that create objects on demand using a
|
|
<code>Factory</code>.</li>
|
|
</ul>
|
|
<p>
|
|
Access to Iterators and Comparators has also been brought in line, by the provision
|
|
of <code>IteratorUtils</code> and <code>ComparatorUtils</code>.
|
|
</p>
|
|
|
|
<hr />
|
|
|
|
<center><h3>
|
|
NEW COLLECTIONS, COMPARATORS, ITERATORS AND UTILITY CLASSES
|
|
</h3></center>
|
|
|
|
<p>These collections are new to <i>Collections 3.0</i>:</p>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
<p>These comparators are new to <i>Collections 2.1</i>:</p>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
<p>These iterators are new to <i>Collections 2.1</i>:</p>
|
|
|
|
<ul>
|
|
<li><strong>ArrayListIterator</strong> - Provides a ListIterator over an array
|
|
of any type (including primitive arrays).</li>
|
|
|
|
<li><strong>LoopingIterator</strong> - Provides an Iterator that loops repeatedly
|
|
over the collection.</li>
|
|
|
|
<li><strong>ObjectArrayIterator/ListIterator</strong> -
|
|
Provides iterators over an Object array.</li>
|
|
|
|
<li><strong>ResetableIterator/ListIterator</strong> -
|
|
Interface that defines a reset() method to reset the iterator back to the start.</li>
|
|
</ul>
|
|
|
|
<p>These are the new utility classes:</p>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
<hr />
|
|
|
|
<center><h3>CHANGED CLASSES</h3></center>
|
|
|
|
<p>These iterators have changed since <i>Collections 2.1</i>:</p>
|
|
|
|
<ul>
|
|
<li><strong>ArrayIterator</strong> -
|
|
This now implements the ResetableIterator interface. It also supports a start index to iterate from.</li>
|
|
|
|
<li><strong>CollatingIterator</strong> -
|
|
The remove() method now throws IllegalStateException not NoSuchElementException.</li>
|
|
|
|
<li><strong>FilterIterator</strong> -
|
|
The remove() method is now supported, with some limitations.</li>
|
|
|
|
<li><strong>IteratorChain</strong> -
|
|
Bug fix for when remove() called before hasNext()/next().</li>
|
|
|
|
<li><strong>SingletonIterator/ListIterator</strong> -
|
|
These now implement the ResetableIterator interface.</li>
|
|
</ul>
|
|
|
|
|
|
<hr />
|
|
|
|
|
|
<center><h3>REFACTORING</h3></center>
|
|
|
|
<p><u>Documentation</u></p>
|
|
|
|
<p>Every class released in 3.0 has been changed in some way.
|
|
This might be simply the update to the Apache license, or it could be improved Javadoc.</p>
|
|
|