commit
06cc4554b5
|
@ -2,4 +2,4 @@ Apache Commons Collections
|
|||
Copyright 2001-2022 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
The Apache Software Foundation (https://www.apache.org/).
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -33,7 +33,7 @@
|
|||
|
||||
<issueManagement>
|
||||
<system>jira</system>
|
||||
<url>http://issues.apache.org/jira/browse/COLLECTIONS</url>
|
||||
<url>https://issues.apache.org/jira/browse/COLLECTIONS</url>
|
||||
</issueManagement>
|
||||
|
||||
<scm>
|
||||
|
|
|
@ -325,6 +325,9 @@
|
|||
Correct test of Collection toArray(Object[]) vs toArray() to optionally ignore array order.
|
||||
Ordering is not specified for some collections such as Bags.
|
||||
</action>
|
||||
<action issue="COLLECTIONS-835" type="update" dev="kinow" due-to="Marc Wrobel">
|
||||
Fix links in javadoc and documentations #325.
|
||||
</action>
|
||||
</release>
|
||||
<release version="4.4" date="2019-07-05" description="Maintenance release.">
|
||||
<action issue="COLLECTIONS-710" dev="ggregory" type="fix" due-to="Yu Shi, Gary Gregory">
|
||||
|
|
|
@ -20,7 +20,7 @@ $introduction.replaceAll("(?<!\015)\012", "
|
|||
")
|
||||
|
||||
## N.B. the available variables are described here:
|
||||
## http://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html
|
||||
## https://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html
|
||||
## Hack to improve layout: replace all pairs of spaces with a single new-line
|
||||
$release.description.replaceAll(" ", "
|
||||
")
|
||||
|
|
|
@ -473,7 +473,7 @@ public class ListUtils {
|
|||
* produced on demand using {@link List#subList(int, int)}, and are subject
|
||||
* to all the usual caveats about modification as explained in that API.
|
||||
* <p>
|
||||
* Adapted from http://code.google.com/p/guava-libraries/
|
||||
* Adapted from https://github.com/google/guava
|
||||
*
|
||||
* @param <T> the element type
|
||||
* @param list the list to return consecutive sublists of
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.SortedMap;
|
|||
|
||||
/**
|
||||
* Defines the interface for a prefix tree, an ordered tree data structure. For
|
||||
* more information, see <a href="http://en.wikipedia.org/wiki/Trie">Tries</a>.
|
||||
* more information, see <a href="https://en.wikipedia.org/wiki/Trie">Tries</a>.
|
||||
*
|
||||
* @param <K> the type of the keys in this map
|
||||
* @param <V> the type of the values in this map
|
||||
|
|
|
@ -63,7 +63,7 @@ import org.apache.commons.collections4.keyvalue.DefaultMapEntry;
|
|||
* Different types of references can be specified for keys and values.
|
||||
* The keys can be configured to be weak but the values hard,
|
||||
* in which case this class will behave like a
|
||||
* <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/WeakHashMap.html">
|
||||
* <a href="https://docs.oracle.com/javase/8/docs/api/java/util/WeakHashMap.html">
|
||||
* {@code WeakHashMap}</a>. However, you can also specify hard keys and
|
||||
* weak values, or any other combination. The default constructor uses
|
||||
* hard keys and soft values, providing a memory-sensitive cache.
|
||||
|
|
|
@ -36,7 +36,7 @@ import java.io.Serializable;
|
|||
* Different types of references can be specified for keys and values.
|
||||
* The keys can be configured to be weak but the values hard,
|
||||
* in which case this class will behave like a
|
||||
* <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/WeakHashMap.html">
|
||||
* <a href="https://docs.oracle.com/javase/8/docs/api/java/util/WeakHashMap.html">
|
||||
* {@code WeakHashMap}</a>. However, you can also specify hard keys and
|
||||
* weak values, or any other combination. The default constructor uses
|
||||
* hard keys and soft values, providing a memory-sensitive cache.
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.apache.commons.collections4.functors.DefaultEquator;
|
|||
* <p>
|
||||
* This class implements the comparison algorithm, which is the very efficient
|
||||
* algorithm from Eugene W. Myers
|
||||
* <a href="http://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">
|
||||
* <a href="https://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">
|
||||
* An O(ND) Difference Algorithm and Its Variations</a>. This algorithm produces
|
||||
* the shortest possible
|
||||
* {@link EditScript edit script}
|
||||
|
@ -159,7 +159,7 @@ public class SequencesComparator<T> {
|
|||
* The snake is found using the MYERS Algorithm (this algorithms has
|
||||
* also been implemented in the GNU diff program). This algorithm is
|
||||
* explained in Eugene Myers article:
|
||||
* <a href="http://www.cs.arizona.edu/people/gene/PAPERS/diff.ps">
|
||||
* <a href="https://web.archive.org/web/20040719035900/http%3A//www.cs.arizona.edu/people/gene/PAPERS/diff.ps">
|
||||
* An O(ND) Difference Algorithm and Its Variations</a>.
|
||||
*
|
||||
* @param start1 the begin of the first sequence to be compared
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* <p>
|
||||
* The package uses a very efficient comparison algorithm designed by
|
||||
* Eugene W. Myers and described in his paper: <a
|
||||
* href="http://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">An O(ND)
|
||||
* href="https://www.cis.upenn.edu/~bcpierce/courses/dd/papers/diff.ps">An O(ND)
|
||||
* Difference Algorithm and Its Variations</a>. This algorithm produces
|
||||
* the shortest possible
|
||||
* {@link org.apache.commons.collections4.sequence.EditScript edit script} containing
|
||||
|
|
|
@ -57,9 +57,9 @@ import org.apache.commons.collections4.trie.analyzer.StringKeyAnalyzer;
|
|||
*
|
||||
* @param <V> the type of the values in this map
|
||||
*
|
||||
* @see <a href="http://en.wikipedia.org/wiki/Radix_tree">Radix Tree</a>
|
||||
* @see <a href="http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Tree/PATRICIA">PATRICIA</a>
|
||||
* @see <a href="http://www.imperialviolet.org/binary/critbit.pdf">Crit-Bit Tree</a>
|
||||
* @see <a href="https://en.wikipedia.org/wiki/Radix_tree">Radix Tree</a>
|
||||
* @see <a href="https://users.monash.edu/~lloyd/tildeAlgDS/Tree/PATRICIA/">PATRICIA</a>
|
||||
* @see <a href="https://www.imperialviolet.org/binary/critbit.pdf">Crit-Bit Tree</a>
|
||||
* @since 4.0
|
||||
*/
|
||||
public class PatriciaTrie<V> extends AbstractPatriciaTrie<String, V> {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<!-- ================================================== -->
|
||||
<section name="Building Commons Collections">
|
||||
<p>
|
||||
Commons Collections uses <a href="http://maven.apache.org">Maven 3</a> as its
|
||||
Commons Collections uses <a href="https://maven.apache.org">Maven 3</a> as its
|
||||
primary build system.
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -44,7 +44,7 @@ There are two types of compatibility discussed here, source and binary.
|
|||
Two versions are binary compatible when application code compiled against
|
||||
one version will run using the other version without recompilation.
|
||||
This is much more difficult to test for, and follows quite complicated rules from the
|
||||
<a href="http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html">Java language</a>.
|
||||
<a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html">Java language</a>.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<!-- ================================================== -->
|
||||
<section name="Commons Collections">
|
||||
<p>
|
||||
The <a href="http://docs.oracle.com/javase/tutorial/collections/">Java Collections Framework</a>
|
||||
The <a href="https://docs.oracle.com/javase/tutorial/collections/">Java Collections Framework</a>
|
||||
was a major addition in JDK 1.2.
|
||||
It added many powerful data structures that accelerate development of most significant Java applications.
|
||||
Since that time it has become the recognised standard for collection handling in Java.
|
||||
|
@ -76,7 +76,7 @@ The latest version is 4.4 -
|
|||
It is built for Java 8 and later, and the <a href="release_4_4.html">release notes</a> are also available.
|
||||
</p>
|
||||
<p>
|
||||
For previous releases, see the <a href="http://archive.apache.org/dist/commons/collections/">Apache Archive</a>
|
||||
For previous releases, see the <a href="https://archive.apache.org/dist/commons/collections/">Apache Archive</a>
|
||||
</p>
|
||||
</section>
|
||||
<!-- ================================================== -->
|
||||
|
|
|
@ -57,7 +57,7 @@ limitations under the License.
|
|||
<p>
|
||||
To use JIRA you may need to <a href="https://issues.apache.org/jira/secure/Signup!default.jspa">create an account</a>
|
||||
(if you have previously created/updated Commons issues using Bugzilla an account will have been automatically
|
||||
created and you can use the <a href="https://issues.apache.org/jira/secure/ForgotPassword!default.jspa">Forgot Password</a>
|
||||
created and you can use the <a href="https://issues.apache.org/jira/secure/ForgotLoginDetails.jspa">Forgot Password</a>
|
||||
page to get a new password).
|
||||
</p>
|
||||
|
||||
|
@ -86,7 +86,7 @@ limitations under the License.
|
|||
|
||||
<p>
|
||||
For more information on subversion and creating patches see the
|
||||
<a href="http://www.apache.org/dev/contributors.html">Apache Contributors Guide</a>.
|
||||
<a href="https://www.apache.org/dev/contributors.html">Apache Contributors Guide</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -49,7 +49,7 @@ limitations under the License.
|
|||
<section name="Overview">
|
||||
<p>
|
||||
<a href="index.html">Apache Commons Collections</a> shares mailing lists with all the other
|
||||
<a href="http://commons.apache.org/components.html">Commons Components</a>.
|
||||
<a href="https://commons.apache.org/components.html">Commons Components</a>.
|
||||
To make it easier for people to only read messages related to components they are interested in,
|
||||
the convention in Commons is to prefix the subject line of messages with the component's name,
|
||||
for example:
|
||||
|
@ -59,9 +59,9 @@ limitations under the License.
|
|||
</p>
|
||||
<p>
|
||||
Questions related to the usage of Apache Commons Collections should be posted to the
|
||||
<a href="http://mail-archives.apache.org/mod_mbox/commons-user/">User List</a>.
|
||||
<a href="https://lists.apache.org/list.html?user@commons.apache.org">User List</a>.
|
||||
<br />
|
||||
The <a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">Developer List</a>
|
||||
The <a href="https://lists.apache.org/list.html?dev@commons.apache.org">Developer List</a>
|
||||
is for questions and discussion related to the development of Apache Commons Collections.
|
||||
<br />
|
||||
Please do not cross-post; developers are also subscribed to the user list.
|
||||
|
@ -105,9 +105,9 @@ limitations under the License.
|
|||
<td><a href="mailto:user-subscribe@commons.apache.org">Subscribe</a></td>
|
||||
<td><a href="mailto:user-unsubscribe@commons.apache.org">Unsubscribe</a></td>
|
||||
<td><a href="mailto:user@commons.apache.org?subject=[collections]">Post</a></td>
|
||||
<td><a href="http://mail-archives.apache.org/mod_mbox/commons-user/">mail-archives.apache.org</a></td>
|
||||
<td><a href="http://markmail.org/list/org.apache.commons.users/">markmail.org</a><br />
|
||||
<a href="http://www.mail-archive.com/user@commons.apache.org/">www.mail-archive.com</a><br />
|
||||
<td><a href="https://lists.apache.org/list.html?user@commons.apache.org">mail-archives.apache.org</a></td>
|
||||
<td><a href="https://markmail.org/list/org.apache.commons.users/">markmail.org</a><br />
|
||||
<a href="https://www.mail-archive.com/user@commons.apache.org/">www.mail-archive.com</a><br />
|
||||
<a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -123,9 +123,9 @@ limitations under the License.
|
|||
<td><a href="mailto:dev-subscribe@commons.apache.org">Subscribe</a></td>
|
||||
<td><a href="mailto:dev-unsubscribe@commons.apache.org">Unsubscribe</a></td>
|
||||
<td><a href="mailto:dev@commons.apache.org?subject=[collections]">Post</a></td>
|
||||
<td><a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">mail-archives.apache.org</a></td>
|
||||
<td><a href="http://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br />
|
||||
<a href="http://www.mail-archive.com/dev@commons.apache.org/">www.mail-archive.com</a><br />
|
||||
<td><a href="https://lists.apache.org/list.html?dev@commons.apache.org">mail-archives.apache.org</a></td>
|
||||
<td><a href="https://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br />
|
||||
<a href="https://www.mail-archive.com/dev@commons.apache.org/">www.mail-archive.com</a><br />
|
||||
<a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -141,9 +141,9 @@ limitations under the License.
|
|||
<td><a href="mailto:issues-subscribe@commons.apache.org">Subscribe</a></td>
|
||||
<td><a href="mailto:issues-unsubscribe@commons.apache.org">Unsubscribe</a></td>
|
||||
<td><i>read only</i></td>
|
||||
<td><a href="http://mail-archives.apache.org/mod_mbox/commons-issues/">mail-archives.apache.org</a></td>
|
||||
<td><a href="http://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br />
|
||||
<a href="http://www.mail-archive.com/issues@commons.apache.org/">www.mail-archive.com</a>
|
||||
<td><a href="https://lists.apache.org/list.html?issues@commons.apache.org">mail-archives.apache.org</a></td>
|
||||
<td><a href="https://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br />
|
||||
<a href="https://www.mail-archive.com/issues@commons.apache.org/">www.mail-archive.com</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -158,9 +158,9 @@ limitations under the License.
|
|||
<td><a href="mailto:commits-subscribe@commons.apache.org">Subscribe</a></td>
|
||||
<td><a href="mailto:commits-unsubscribe@commons.apache.org">Unsubscribe</a></td>
|
||||
<td><i>read only</i></td>
|
||||
<td><a href="http://mail-archives.apache.org/mod_mbox/commons-commits/">mail-archives.apache.org</a></td>
|
||||
<td><a href="http://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br />
|
||||
<a href="http://www.mail-archive.com/commits@commons.apache.org/">www.mail-archive.com</a>
|
||||
<td><a href="https://lists.apache.org/list.html?commits@commons.apache.org">mail-archives.apache.org</a></td>
|
||||
<td><a href="https://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br />
|
||||
<a href="https://www.mail-archive.com/commits@commons.apache.org/">www.mail-archive.com</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -191,10 +191,10 @@ limitations under the License.
|
|||
<td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td>
|
||||
<td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td>
|
||||
<td><i>read only</i></td>
|
||||
<td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td>
|
||||
<td><a class="externalLink" href="http://markmail.org/list/org.apache.announce/">markmail.org</a><br />
|
||||
<td><a class="externalLink" href="https://lists.apache.org/list.html?announce@apache.org">mail-archives.apache.org</a></td>
|
||||
<td><a class="externalLink" href="https://markmail.org/list/org.apache.announce/">markmail.org</a><br />
|
||||
<a class="externalLink" href="http://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br />
|
||||
<a class="externalLink" href="http://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
|
||||
<a class="externalLink" href="https://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
|
||||
<a class="externalLink" href="http://news.gmane.org/gmane.comp.apache.announce">news.gmane.org</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -89,19 +89,19 @@ For example you could convert a country code to text <i>but not</i> text to coun
|
|||
<h3>BidiMap interface</h3>
|
||||
|
||||
<p>
|
||||
The <a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/BidiMap.html">BidiMap</a> interface and implementations in Commons Collections allow you to lookup data in both directions. There are three implementations:
|
||||
The <a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/BidiMap.html">BidiMap</a> interface and implementations in Commons Collections allow you to lookup data in both directions. There are three implementations:
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/bidimap/DualHashBidiMap.html">DualHashBidiMap</a></td>
|
||||
<td>Uses two <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html">HashMap</a> objects internally. This implementation is a useful general purpose BidiMap that can store any object. The objects are stored in any order, and the order may change over time.</td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/bidimap/DualHashBidiMap.html">DualHashBidiMap</a></td>
|
||||
<td>Uses two <a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html">HashMap</a> objects internally. This implementation is a useful general purpose BidiMap that can store any object. The objects are stored in any order, and the order may change over time.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/bidimap/DualTreeBidiMap.html">DualTreeBidiMap</a></td>
|
||||
<td>Uses two <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/TreeMap.html">TreeMap</a> objects internally which means that keys and values must implement <a href="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. If considering this class, the TreeBidiMap is usually a better choice. However, this is the only implementation of the <a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/SortedBidiMap.html">SortedBidiMap</a> interface.</td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/bidimap/DualTreeBidiMap.html">DualTreeBidiMap</a></td>
|
||||
<td>Uses two <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html">TreeMap</a> objects internally which means that keys and values must implement <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. If considering this class, the TreeBidiMap is usually a better choice. However, this is the only implementation of the <a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/SortedBidiMap.html">SortedBidiMap</a> interface.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/bidimap/TreeBidiMap.html">TreeBidiMap</a></td>
|
||||
<td>Dedicated implementation that requires keys and values to implement <a href="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. This is an efficient implementation using a data structure that avoids duplicating data. The keys and values are held and viewed in sorted order, and the class implements the <a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/OrderedBidiMap.html">OrderedBidiMap</a> interface.</td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/bidimap/TreeBidiMap.html">TreeBidiMap</a></td>
|
||||
<td>Dedicated implementation that requires keys and values to implement <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. This is an efficient implementation using a data structure that avoids duplicating data. The keys and values are held and viewed in sorted order, and the class implements the <a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/OrderedBidiMap.html">OrderedBidiMap</a> interface.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
@ -112,66 +112,62 @@ The <a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/
|
|||
<h3>Map interface</h3>
|
||||
|
||||
<p>
|
||||
The <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html">Map</a> interface and implementations in both the JDK and Commons Collections allow you to lookup data from a key to a value. This is one of the most powerful interfaces in the JDK, however it is very difficult to implement. These are the available implementations:
|
||||
The <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html">Map</a> interface and implementations in both the JDK and Commons Collections allow you to lookup data from a key to a value. This is one of the most powerful interfaces in the JDK, however it is very difficult to implement. These are the available implementations:
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html">HashMap</a> (JDK)</td>
|
||||
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html">HashMap</a> (JDK)</td>
|
||||
<td>This map is the most commonly used and fastest implementation. It is suitable for most situations and can store any object. Objects are stored in any order, and the order may change over time.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/HashedMap.html">HashedMap</a></td>
|
||||
<td>The Commons Collections hash map implementation which is very similar in design to HashMap, but also supports easy iteration via a <a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/MapIterator.html">MapIterator</a>. This implementation is also designed to be subclassed. Use this map if you want to use the extra iterator, or to subclass. Otherwise, there is no advantage (or disadvantage) compared to the JDK HashMap.</td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/HashedMap.html">HashedMap</a></td>
|
||||
<td>The Commons Collections hash map implementation which is very similar in design to HashMap, but also supports easy iteration via a <a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/MapIterator.html">MapIterator</a>. This implementation is also designed to be subclassed. Use this map if you want to use the extra iterator, or to subclass. Otherwise, there is no advantage (or disadvantage) compared to the JDK HashMap.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/IdentityMap.html">IdentityMap</a></td>
|
||||
<td>This map operates exactly as per HashedMap but compares keys and values using == not .equals().</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://java.sun.com/j2se/1.4/docs/api/java/util/IdentityHashMap.html">IdentityHashMap</a> (JDK)</td>
|
||||
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/IdentityHashMap.html">IdentityHashMap</a> (JDK)</td>
|
||||
<td>This map operates exactly as per HashMap but compares keys and values using == not .equals().</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://java.sun.com/j2se/1.4/docs/api/java/util/TreeMap.html">TreeMap</a> (JDK)</td>
|
||||
<td>This map ensures that the keys are always sorted, and iteration order is consistent. All keys must implement <a href="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. This map should be used if you need the map to be sorted.</td>
|
||||
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html">TreeMap</a> (JDK)</td>
|
||||
<td>This map ensures that the keys are always sorted, and iteration order is consistent. All keys must implement <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html">Comparable</a>, unless a comparator is supplied. This map should be used if you need the map to be sorted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/LinkedMap.html">LinkedMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/LinkedMap.html">LinkedMap</a></td>
|
||||
<td>This map maintains the order that each object is added to the map. When the map is viewed via an iterator, the insertion order will be seen. This map should be used if you need to retain the insertion order.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://java.sun.com/j2se/1.4/docs/api/java/util/LinkedHashMap.html">LinkedHashMap</a> (JDK)</td>
|
||||
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html">LinkedHashMap</a> (JDK)</td>
|
||||
<td>This map, available from JDK 1.4, maintains the order that each object is added to the map. When the map is viewed via an iterator, the insertion order will be seen. Commons collections' LinkedMap provides the same functionality for JDK1.2 onwards and provides a MapIterator.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/ListOrderedMap.html">ListOrderedMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/ListOrderedMap.html">ListOrderedMap</a></td>
|
||||
<td>This map decorates another map to maintains the order that each object is added to the map. The order is maintained using a list. This map should be used if you need to retain the insertion order but you also need the special features of another map.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/LRUMap.html">LRUMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/LRUMap.html">LRUMap</a></td>
|
||||
<td>This map places a maximum size limit on the map and removes the least recently used (LRU) key-value when it is full. This map should be used for caches where you want to limit the maximum memory size used, and are happy with the least recently used algorithm for removals.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/ReferenceMap.html">ReferenceMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/ReferenceMap.html">ReferenceMap</a></td>
|
||||
<td>This map enables keys and values to be garbage collected whilst still held in the map. This can be useful for building memory sensitive caches. This map should be used for caches where you want to allow garbage collection from the map.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://java.sun.com/j2se/1.4/docs/api/java/util/WeakHashMap.html">WeakHashMap</a> (JDK)</td>
|
||||
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/util/WeakHashMap.html">WeakHashMap</a> (JDK)</td>
|
||||
<td>This map stores each key-value pair with a key that can be garbage collected. This can be useful for building memory sensitive caches. ReferenceMap provides the same functionality but with much more flexibility.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/ReferenceIdentityMap.html">ReferenceIdentityMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/ReferenceIdentityMap.html">ReferenceIdentityMap</a></td>
|
||||
<td>This map operates exactly as per ReferenceMap but compares keys and values using == not .equals().</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/SingletonMap.html">SingletonMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/SingletonMap.html">SingletonMap</a></td>
|
||||
<td>This map is restricted to storing one key-value pair. It may contain no more than and no less than one pair. It provides a MapIterator. This map should be used if you want to return one key-value pair and must use the Map interface.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/Flat3Map.html">Flat3Map</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/Flat3Map.html">Flat3Map</a></td>
|
||||
<td>This map is optimised to store one, two or three key-value pairs and outperforms HashMap at these sizes. For size four and above performance is about 5% slower than HashMap. This map also has good garbage collection characteristics when below size four. It provides a MapIterator. This map should be used if are 99% sure that the map will be size three or less.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://commons.apache.org/collections/apidocs-COLLECTIONS_3_1/org/apache/commons/collections/map/StaticBucketMap.html">StaticBucketMap</a></td>
|
||||
<td><a href="https://commons.apache.org/proper/commons-collections/javadocs/api-4.4/org/apache/commons/collections4/map/StaticBucketMap.html">StaticBucketMap</a></td>
|
||||
<td>This map is optimised to work well in a heavily loaded multi-threaded environment. It provides synchronization internally, locking on a per 'bucket' basis, where the buckets are fixed at construction time. You should use this class if you can predict the size of the map and you are working in a very intensive multi-threaded environment.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -90,16 +90,16 @@
|
|||
|
||||
<ol>
|
||||
<li>Vulnerability Report for Oracle Weblogic Server:
|
||||
<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-4852">CVE-2015-4852</a></li>
|
||||
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-4852">CVE-2015-4852</a></li>
|
||||
<li>Vulnerability Report for Red Hat JBoss products:
|
||||
<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7501">CVE-2015-7501</a>
|
||||
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7501">CVE-2015-7501</a>
|
||||
(<a href="https://access.redhat.com/security/cve/cve-2015-7501">Red Hat Portal</a>)</li>
|
||||
<li>Apache Commons
|
||||
<a href="https://blogs.apache.org/foundation/entry/apache_commons_statement_to_widespread">statement</a>
|
||||
to widespread Java object de-serialisation vulnerability</li>
|
||||
<li><a href="http://www.slideshare.net/frohoff1/appseccali-2015-marshalling-pickles">
|
||||
<li><a href="https://www.slideshare.net/frohoff1/appseccali-2015-marshalling-pickles">
|
||||
Presentation</a> @ AppSecCali2015 by Lawrence and Frohoff</li>
|
||||
<li><a href="http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability">Attack scenarios</a>
|
||||
<li><a href="https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/">Attack scenarios</a>
|
||||
for various products by Stephen Breen</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
@ -1213,8 +1213,8 @@ public abstract class AbstractMapTest<K, V> extends AbstractObjectTest {
|
|||
* "removeValue" method.)
|
||||
* </p>
|
||||
* <p>
|
||||
* See bug <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=9573">
|
||||
* 9573</a>.
|
||||
* See bug <a href="https://issues.apache.org/jira/browse/COLLECTIONS-92">
|
||||
* COLLECTIONS-92</a>.
|
||||
* </p>
|
||||
*/
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue