You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2011/05/20 15:04:45 UTC

svn commit: r1125367 - in /commons/proper/collections/trunk/src/java/org/apache/commons/collections: ./ functors/ map/

Author: brentworden
Date: Fri May 20 13:04:44 2011
New Revision: 1125367

URL: http://svn.apache.org/viewvc?rev=1125367&view=rev
Log:
[COLLECTIONS-229] removed remaining deprecated methods.

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/PredicateUtils.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/AllPredicate.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/EqualPredicate.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/FalsePredicate.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NullPredicate.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/TruePredicate.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazyMap.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazySortedMap.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/PredicateUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/PredicateUtils.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/PredicateUtils.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/PredicateUtils.java Fri May 20 13:04:44 2011
@@ -21,9 +21,7 @@ import java.util.Collection;
 import org.apache.commons.collections.functors.AllPredicate;
 import org.apache.commons.collections.functors.AndPredicate;
 import org.apache.commons.collections.functors.AnyPredicate;
-import org.apache.commons.collections.functors.EqualPredicate;
 import org.apache.commons.collections.functors.ExceptionPredicate;
-import org.apache.commons.collections.functors.FalsePredicate;
 import org.apache.commons.collections.functors.IdentityPredicate;
 import org.apache.commons.collections.functors.InstanceofPredicate;
 import org.apache.commons.collections.functors.InvokerTransformer;
@@ -33,12 +31,10 @@ import org.apache.commons.collections.fu
 import org.apache.commons.collections.functors.NullIsExceptionPredicate;
 import org.apache.commons.collections.functors.NullIsFalsePredicate;
 import org.apache.commons.collections.functors.NullIsTruePredicate;
-import org.apache.commons.collections.functors.NullPredicate;
 import org.apache.commons.collections.functors.OnePredicate;
 import org.apache.commons.collections.functors.OrPredicate;
 import org.apache.commons.collections.functors.TransformedPredicate;
 import org.apache.commons.collections.functors.TransformerPredicate;
-import org.apache.commons.collections.functors.TruePredicate;
 import org.apache.commons.collections.functors.UniquePredicate;
 
 /**
@@ -97,45 +93,6 @@ public class PredicateUtils {
     }
 
     /**
-     * Gets a Predicate that always returns true.
-     *
-     * @see org.apache.commons.collections.functors.TruePredicate
-     *
-     * @return the predicate
-     * @deprecated use {@link TruePredicate#truePredicate()} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> truePredicate() {
-        return TruePredicate.truePredicate();
-    }
-
-    /**
-     * Gets a Predicate that always returns false.
-     *
-     * @see org.apache.commons.collections.functors.FalsePredicate
-     *
-     * @return the predicate
-     * @deprecated use {@link FalsePredicate#falsePredicate()} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> falsePredicate() {
-        return FalsePredicate.<T>getInstance();
-    }
-
-    /**
-     * Gets a Predicate that checks if the input object passed in is null.
-     *
-     * @see org.apache.commons.collections.functors.NullPredicate
-     *
-     * @return the predicate
-     * @deprecated use {@link NullPredicate#nullPredicate()} instead
-     */
-    @Deprecated
-    public static <T> Predicate<T> nullPredicate() {
-        return NullPredicate.nullPredicate();
-    }
-
-    /**
      * Gets a Predicate that checks if the input object passed in is not null.
      *
      * @see org.apache.commons.collections.functors.NotNullPredicate
@@ -148,21 +105,6 @@ public class PredicateUtils {
 
     /**
      * Creates a Predicate that checks if the input object is equal to the
-     * specified object using equals().
-     *
-     * @see org.apache.commons.collections.functors.EqualPredicate
-     *
-     * @param value  the value to compare against
-     * @return the predicate
-     * @deprecated use {@link EqualPredicate#equalPredicate(Object)} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> equalPredicate(T value) {
-        return EqualPredicate.equalPredicate(value);
-    }
-
-    /**
-     * Creates a Predicate that checks if the input object is equal to the
      * specified object by identity.
      *
      * @see org.apache.commons.collections.functors.IdentityPredicate
@@ -272,24 +214,6 @@ public class PredicateUtils {
 
     /**
      * Create a new Predicate that returns true only if all of the specified
-     * predicates are true.
-     * If the array of predicates is empty, then this predicate returns true.
-     *
-     * @see org.apache.commons.collections.functors.AllPredicate
-     *
-     * @param predicates  an array of predicates to check, may not be null
-     * @return the <code>all</code> predicate
-     * @throws IllegalArgumentException if the predicates array is null
-     * @throws IllegalArgumentException if any predicate in the array is null
-     * @deprecated use {@link AllPredicate#allPredicate(Predicate...)} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> allPredicate(Predicate<? super T>[] predicates) {
-        return AllPredicate.allPredicate(predicates);
-    }
-
-    /**
-     * Create a new Predicate that returns true only if all of the specified
      * predicates are true. The predicates are checked in iterator order.
      * If the collection of predicates is empty, then this predicate returns true.
      *

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/AllPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/AllPredicate.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/AllPredicate.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/AllPredicate.java Fri May 20 13:04:44 2011
@@ -58,23 +58,6 @@ public final class AllPredicate<T> imple
      * @return the <code>all</code> predicate
      * @throws IllegalArgumentException if the predicates array is null
      * @throws IllegalArgumentException if any predicate in the array is null
-     * @deprecated Use {@link #allPredicate(Predicate...)} instead
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance(Predicate<? super T> ... predicates) {
-        return allPredicate(predicates);
-    }
-
-    /**
-     * Factory to create the predicate.
-     * <p>
-     * If the array is size zero, the predicate always returns true.
-     * If the array is size one, then that predicate is returned.
-     *
-     * @param predicates  the predicates to check, cloned, not null
-     * @return the <code>all</code> predicate
-     * @throws IllegalArgumentException if the predicates array is null
-     * @throws IllegalArgumentException if any predicate in the array is null
      */
     public static <T> Predicate<T> allPredicate(Predicate<? super T> ... predicates) {
         FunctorUtils.validate(predicates);
@@ -98,23 +81,6 @@ public final class AllPredicate<T> imple
      * @return the <code>all</code> predicate
      * @throws IllegalArgumentException if the predicates array is null
      * @throws IllegalArgumentException if any predicate in the array is null
-     * @deprecated Use {@link #allPredicate(Collection)} instead
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance(Collection<Predicate<T>> predicates) {
-        return allPredicate(predicates);
-    }
-
-    /**
-     * Factory to create the predicate.
-     * <p>
-     * If the collection is size zero, the predicate always returns true.
-     * If the collection is size one, then that predicate is returned.
-     *
-     * @param predicates  the predicates to check, cloned, not null
-     * @return the <code>all</code> predicate
-     * @throws IllegalArgumentException if the predicates array is null
-     * @throws IllegalArgumentException if any predicate in the array is null
      */
     public static <T> Predicate<T> allPredicate(Collection<? extends Predicate<T>> predicates) {
         final Predicate<T>[] preds = validate(predicates);

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/EqualPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/EqualPredicate.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/EqualPredicate.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/EqualPredicate.java Fri May 20 13:04:44 2011
@@ -45,22 +45,6 @@ public final class EqualPredicate<T> imp
      * @param object  the object to compare to
      * @return the predicate
      * @throws IllegalArgumentException if the predicate is null
-     * @deprecated use {@link #equalPredicate(Object)} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance(T object) {
-        if (object == null) {
-            return nullPredicate();
-        }
-        return new EqualPredicate<T>(object);
-    }
-
-    /**
-     * Factory to create the identity predicate.
-     * 
-     * @param object  the object to compare to
-     * @return the predicate
-     * @throws IllegalArgumentException if the predicate is null
      */
     public static <T> Predicate<T> equalPredicate(T object) {
         if (object == null) {

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/FalsePredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/FalsePredicate.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/FalsePredicate.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/FalsePredicate.java Fri May 20 13:04:44 2011
@@ -40,18 +40,6 @@ public final class FalsePredicate<T> imp
      * Get a typed instance.
      *
      * @return the singleton instance
-     * @since Commons Collections 3.1
-     * @deprecated use {@link #falsePredicate()} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance() {
-        return FalsePredicate.<T>falsePredicate();
-    }
-
-    /**
-     * Get a typed instance.
-     *
-     * @return the singleton instance
      * @since Commons Collections 5
      */
     @SuppressWarnings("unchecked")

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NullPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NullPredicate.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NullPredicate.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NullPredicate.java Fri May 20 13:04:44 2011
@@ -41,18 +41,6 @@ public final class NullPredicate<T> impl
      *
      * @return the singleton instance
      * @since Commons Collections 3.1
-     * @deprecated use {@link #nullPredicate()} instead.
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance() {
-        return nullPredicate();
-    }
-
-    /**
-     * Factory returning the singleton instance.
-     *
-     * @return the singleton instance
-     * @since Commons Collections 3.1
      */
     @SuppressWarnings("unchecked")
     public static <T> Predicate<T> nullPredicate() {

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/TruePredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/TruePredicate.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/TruePredicate.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/TruePredicate.java Fri May 20 13:04:44 2011
@@ -42,18 +42,6 @@ public final class TruePredicate<T> impl
      *
      * @return the singleton instance
      * @since Commons Collections 3.1
-     * @deprecated
-     */
-    @Deprecated
-    public static <T> Predicate<T> getInstance() {
-        return truePredicate();
-    }
-
-    /**
-     * Factory returning the singleton instance.
-     *
-     * @return the singleton instance
-     * @since Commons Collections 3.1
      */
     @SuppressWarnings("unchecked")
     public static <T> Predicate<T> truePredicate() {

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazyMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazyMap.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazyMap.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazyMap.java Fri May 20 13:04:44 2011
@@ -76,19 +76,6 @@ public class LazyMap<K, V> extends Abstr
      * @param map  the map to decorate, must not be null
      * @param factory  the factory to use, must not be null
      * @throws IllegalArgumentException if map or factory is null
-     * @deprecated use {@link #getLazyMap(Map, Factory)} instead.
-     */
-    @Deprecated
-    public static <K,V> Map<K,V> decorate(Map<K,V> map, Factory<? extends V> factory) {
-        return getLazyMap(map, factory);
-    }
-
-    /**
-     * Factory method to create a lazily instantiated map.
-     * 
-     * @param map  the map to decorate, must not be null
-     * @param factory  the factory to use, must not be null
-     * @throws IllegalArgumentException if map or factory is null
      */
     public static <K, V> LazyMap<K, V> getLazyMap(Map<K, V> map, Factory< ? extends V> factory) {
         return new LazyMap<K,V>(map, factory);
@@ -100,19 +87,6 @@ public class LazyMap<K, V> extends Abstr
      * @param map  the map to decorate, must not be null
      * @param factory  the factory to use, must not be null
      * @throws IllegalArgumentException if map or factory is null
-     * @deprecated use {@link #getLazyMap(Map, Transformer)} instead.
-     */
-    @Deprecated
-    public static <K,V> Map<K,V> decorate(Map<K,V> map, Transformer<? super K, ? extends V> factory) {
-        return getLazyMap(map, factory);
-    }
-
-    /**
-     * Factory method to create a lazily instantiated map.
-     * 
-     * @param map  the map to decorate, must not be null
-     * @param factory  the factory to use, must not be null
-     * @throws IllegalArgumentException if map or factory is null
      */
     public static <V, K> LazyMap<K, V> getLazyMap(Map<K, V> map, Transformer<? super K, ? extends V> factory) {
         return new LazyMap<K,V>(map, factory);

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazySortedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazySortedMap.java?rev=1125367&r1=1125366&r2=1125367&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazySortedMap.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/LazySortedMap.java Fri May 20 13:04:44 2011
@@ -65,18 +65,6 @@ public class LazySortedMap<K,V>
     /** Serialization version */
     private static final long serialVersionUID = 2715322183617658933L;
 
-    /**
-     * Factory method to create a lazily instantiated sorted map.
-     * 
-     * @param map  the map to decorate, must not be null
-     * @param factory  the factory to use, must not be null
-     * @throws IllegalArgumentException if map or factory is null
-     * @deprecated
-     */
-    @Deprecated
-    public static <K,V> SortedMap<K,V> decorate(SortedMap<K,V> map, Factory<? extends V> factory) {
-        return getLazySortedMap(map, factory);
-    }
 
     /**
      * Factory method to create a lazily instantiated sorted map.
@@ -95,19 +83,6 @@ public class LazySortedMap<K,V>
      * @param map  the map to decorate, must not be null
      * @param factory  the factory to use, must not be null
      * @throws IllegalArgumentException if map or factory is null
-     * @deprecated
-     */
-    @Deprecated
-    public static <K,V> SortedMap<K,V> decorate(SortedMap<K,V> map, Transformer<? super K, ? extends V> factory) {
-        return getLazySortedMap(map, factory);
-    }
-
-    /**
-     * Factory method to create a lazily instantiated sorted map.
-     * 
-     * @param map  the map to decorate, must not be null
-     * @param factory  the factory to use, must not be null
-     * @throws IllegalArgumentException if map or factory is null
      */
     public static <K, V> SortedMap<K, V> getLazySortedMap(SortedMap<K, V> map, Transformer<? super K, ? extends V> factory) {
         return new LazySortedMap<K,V>(map, factory);