added the new Comparator classes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d3eae5cb3e
commit
3c49cc5368
|
@ -1,7 +1,12 @@
|
||||||
|
<title>RELEASE NOTES: COLLECTIONS 2.0</title>
|
||||||
|
|
||||||
<center><h2>RELEASE NOTES: COLLECTIONS 2.0</h2></center>
|
<center><h2>RELEASE NOTES: COLLECTIONS 2.0</h2></center>
|
||||||
|
|
||||||
|
|
||||||
<center><h3>NEW COLLECTIONS</h3></center>
|
<center><h3>NEW COLLECTIONS AND COMPARATORS</h3></center>
|
||||||
|
|
||||||
|
<p>Collections 2.0 includes a significant number of new collections, in addition to several
|
||||||
|
useful Comparator classes.</p>
|
||||||
|
|
||||||
<p>These collections are new to Collections 2.0:</p>
|
<p>These collections are new to Collections 2.0:</p>
|
||||||
|
|
||||||
|
@ -41,6 +46,26 @@
|
||||||
members.</li>
|
members.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p>These are the new Comparator classes:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><strong>ComparableComparator</strong> - A Comparator that compares Comparable objects.
|
||||||
|
This Comparator is useful, for example,
|
||||||
|
for enforcing the natural order in custom implementations
|
||||||
|
of SortedSet and SortedMap.</li>
|
||||||
|
<li><strong>ComparatorChain</strong> - ComparatorChain is a Comparator that wraps one or
|
||||||
|
more Comparators in sequence. The ComparatorChain
|
||||||
|
calls each Comparator in sequence until either 1)
|
||||||
|
any single Comparator returns a non-zero result
|
||||||
|
(and that result is then returned),
|
||||||
|
or 2) the ComparatorChain is exhausted (and zero is
|
||||||
|
returned). This type of sorting is very similar
|
||||||
|
to multi-column sorting in SQL, and this class
|
||||||
|
allows Java classes to emulate that kind of behaviour
|
||||||
|
when sorting a List.</li>
|
||||||
|
<li><strong>ReverseComparator</strong> - Reverses the order of another comparator.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<center><h3>CHANGED COLLECTIONS</h3></center>
|
<center><h3>CHANGED COLLECTIONS</h3></center>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue