commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1540567 - in /commons/proper/collections/trunk: ./ src/changes/ src/main/java/org/apache/commons/collections4/ src/main/java/org/apache/commons/collections4/functors/ src/main/java/org/apache/commons/collections4/sequence/ src/site/xdoc/
Date Sun, 10 Nov 2013 22:19:29 GMT
Author: tn
Date: Sun Nov 10 22:19:29 2013
New Revision: 1540567

URL: http://svn.apache.org/r1540567
Log:
[COLLECTIONS-494] Move Equator interface to base package.

Added:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
  (with props)
Removed:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/Equator.java
Modified:
    commons/proper/collections/trunk/RELEASE-NOTES.txt
    commons/proper/collections/trunk/src/changes/changes.xml
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
    commons/proper/collections/trunk/src/site/xdoc/release_4_0.xml

Modified: commons/proper/collections/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/RELEASE-NOTES.txt?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/collections/trunk/RELEASE-NOTES.txt Sun Nov 10 22:19:29 2013
@@ -47,6 +47,7 @@ Major changes since 3.2.1
 Changes since 4.0-alpha1
 ------------------------
 
+ o [COLLECTIONS-494] Moved "Equator" interface to base package for consistency. Thanks to
Emmanuel Bourg.
  o [COLLECTIONS-488] Added "CollectionsUtils#matchesAll(Iterable, Predicate)" to test if
all elements
                      of a collection match a given predicate. Thanks to Josh Cain.
  o [COLLECTIONS-485] Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable*
decorators
@@ -158,6 +159,7 @@ New features
 Changed classes / methods
 -------------------------
 
+ o [COLLECTIONS-494] Moved "Equator" interface to base package for consistency. Thanks to
Emmanuel Bourg.
  o [COLLECTIONS-485] Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable*
decorators
                      and iterators. Thanks to Hollis Waite.
  o [COLLECTIONS-480] Narrow return type of "BidiMap#values()" to Set as the values are required
to be unique. Thanks to Hollis Waite.

Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Sun Nov 10 22:19:29 2013
@@ -21,7 +21,26 @@
   </properties>
   <body>
 
-  <release version="4.0" date="TBA" description="Next release">
+  <release version="4.0" date="2013-11-15" description="
+This is a major release: It combines bug fixes, new features and
+changes to existing features.
+
+Most notable changes are: use of generics and other language features introduced in Java
5 (varargs, Iterable),
+removed deprecated classes / methods and features which are now supported by the JDK,
+replaced Buffer interface with java.util.Queue,
+added concept of split maps with respective interfaces Put / Get (see also package splitmap),
+added new Trie interface together with an implementation of a Patricia Trie.
+
+Because of the base package name change, this release can be used together
+with earlier versions of Commons Collections.
+The minimal version of the Java platform required to compile and use
+Commons Collections is Java 5.
+Users are encouraged to upgrade to this version as, in addition to new
+features, this release includes numerous bug fixes.
+  ">
+    <action issue="COLLECTIONS-494" dev="tn" type="update" due-to="Emmanuel Bourg">
+     Moved "Equator" interface to base package for consistency.
+    </action>
     <action issue="COLLECTIONS-488" dev="tn" type="add" due-to="Josh Cain">
      Added "CollectionsUtils#matchesAll(Iterable, Predicate)" to test if all elements
      of a collection match a given predicate.

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/CollectionUtils.java
Sun Nov 10 22:19:29 2013
@@ -36,7 +36,6 @@ import org.apache.commons.collections4.c
 import org.apache.commons.collections4.collection.TransformedCollection;
 import org.apache.commons.collections4.collection.UnmodifiableBoundedCollection;
 import org.apache.commons.collections4.collection.UnmodifiableCollection;
-import org.apache.commons.collections4.functors.Equator;
 import org.apache.commons.collections4.functors.TruePredicate;
 import org.apache.commons.collections4.iterators.CollatingIterator;
 import org.apache.commons.collections4.iterators.PermutationIterator;

Added: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java?rev=1540567&view=auto
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
(added)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
Sun Nov 10 22:19:29 2013
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on
an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.commons.collections4;
+
+/**
+ * An equation function, which determines equality between objects of type T.
+ * <p>
+ * It is the functional sibling of {@link java.util.Comparator}; {@link Equator} is to
+ * {@link Object} as {@link java.util.Comparator} is to {@link java.lang.Comparable}.
+ *
+ * @param <T> the types of object this {@link Equator} can evaluate.
+ * @since 4.0
+ * @version $Id$
+ */
+public interface Equator<T> {
+    /**
+     * Evaluates the two arguments for their equality.
+     *
+     * @param o1 the first object to be equated.
+     * @param o2 the second object to be equated.
+     * @return whether the two objects are equal.
+     */
+    boolean equate(T o1, T o2);
+
+    /**
+     * Calculates the hash for the object, based on the method of equality used in the equate
+     * method. This is used for classes that delegate their {@link Object#equals(Object)
equals(Object)} method to an
+     * Equator (and so must also delegate their {@link Object#hashCode() hashCode()} method),
or for implementations
+     * of {@link org.apache.commons.collections4.map.HashedMap} that use an Equator for the
key objects.
+     *
+     * @param o the object to calculate the hash for.
+     * @return the hash of the object.
+     */
+    int hash(T o);
+}

Propchange: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Propchange: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/Equator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/ListUtils.java
Sun Nov 10 22:19:29 2013
@@ -26,7 +26,6 @@ import java.util.List;
 
 import org.apache.commons.collections4.bag.HashBag;
 import org.apache.commons.collections4.functors.DefaultEquator;
-import org.apache.commons.collections4.functors.Equator;
 import org.apache.commons.collections4.list.FixedSizeList;
 import org.apache.commons.collections4.list.LazyList;
 import org.apache.commons.collections4.list.PredicatedList;

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java
Sun Nov 10 22:19:29 2013
@@ -18,6 +18,8 @@ package org.apache.commons.collections4.
 
 import java.io.Serializable;
 
+import org.apache.commons.collections4.Equator;
+
 /**
  * Default {@link Equator} implementation.
  *

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/EqualPredicate.java
Sun Nov 10 22:19:29 2013
@@ -20,6 +20,7 @@ import static org.apache.commons.collect
 
 import java.io.Serializable;
 
+import org.apache.commons.collections4.Equator;
 import org.apache.commons.collections4.Predicate;
 
 /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java
Sun Nov 10 22:19:29 2013
@@ -18,8 +18,8 @@ package org.apache.commons.collections4.
 
 import java.util.List;
 
+import org.apache.commons.collections4.Equator;
 import org.apache.commons.collections4.functors.DefaultEquator;
-import org.apache.commons.collections4.functors.Equator;
 
 /**
  * This class allows to compare two objects sequences.

Modified: commons/proper/collections/trunk/src/site/xdoc/release_4_0.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/site/xdoc/release_4_0.xml?rev=1540567&r1=1540566&r2=1540567&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/site/xdoc/release_4_0.xml (original)
+++ commons/proper/collections/trunk/src/site/xdoc/release_4_0.xml Sun Nov 10 22:19:29 2013
@@ -155,6 +155,7 @@ have changed.
 
 <center><h3>Changed classes / methods</h3></center>
 <ul>
+<li>Moved "Equator" interface to base package for consistency.</li>
 <li>Accept wildcard input where possible, e.g. in copy-constructors, Unmodifiable*
decorators and iterators.</li>
 <li>Narrow return type of "BidiMap#values()" to Set as the values are required to be
unique.</li>
 <li>Made field "collection" in class "AbstractCollectionDecorator" private and added
setter "setCollection(Collection)" with scope protected to set the decorated collection during
de-serialization.</li>



Mime
View raw message