[COLLECTIONS-229] removed remaining deprecated methods.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1125367 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brent Worden 2011-05-20 13:04:44 +00:00
parent 1f3d2b96a0
commit 501b94143a
8 changed files with 0 additions and 213 deletions

View File

@ -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.functors.NotPredicate;
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;
/**
@ -96,45 +92,6 @@ public class PredicateUtils {
return ExceptionPredicate.<T>getInstance();
}
/**
* 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.
*
@ -146,21 +103,6 @@ public class PredicateUtils {
return NotNullPredicate.<T>getInstance();
}
/**
* 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.
@ -270,24 +212,6 @@ public class PredicateUtils {
return AndPredicate.<T>getInstance(predicate1, predicate2);
}
/**
* 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.

View File

@ -48,23 +48,6 @@ public final class AllPredicate<T> implements Predicate<T>, PredicateDecorator<T
/** The array of predicates to call */
private final Predicate<? super T>[] iPredicates;
/**
* 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
* @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>
@ -88,23 +71,6 @@ public final class AllPredicate<T> implements Predicate<T>, PredicateDecorator<T
return new AllPredicate<T>(FunctorUtils.copy(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
* @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>

View File

@ -39,22 +39,6 @@ public final class EqualPredicate<T> implements Predicate<T>, Serializable {
/** The value to compare to */
private final Object iValue;
/**
* Factory to create the identity predicate.
*
* @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.
*

View File

@ -36,18 +36,6 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
/** Singleton predicate instance */
public static final Predicate<Object> INSTANCE = new FalsePredicate<Object>();
/**
* 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.
*

View File

@ -36,18 +36,6 @@ public final class NullPredicate<T> implements Predicate<T>, Serializable {
/** Singleton predicate instance */
public static final Predicate<?> INSTANCE = new NullPredicate<Object>();
/**
* Factory returning the singleton instance.
*
* @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.
*

View File

@ -37,18 +37,6 @@ public final class TruePredicate<T> implements Predicate<T>, Serializable {
/** Singleton predicate instance */
public static final Predicate<?> INSTANCE = new TruePredicate<Object>();
/**
* Factory returning the singleton instance.
*
* @return the singleton instance
* @since Commons Collections 3.1
* @deprecated
*/
@Deprecated
public static <T> Predicate<T> getInstance() {
return truePredicate();
}
/**
* Factory returning the singleton instance.
*

View File

@ -70,19 +70,6 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Map<K,
/** The factory to use to construct elements */
protected final Transformer<? super K, ? extends V> 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
* @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.
*
@ -94,19 +81,6 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Map<K,
return new LazyMap<K,V>(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
* @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.
*

View File

@ -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.
@ -89,19 +77,6 @@ public class LazySortedMap<K,V>
return new LazySortedMap<K,V>(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
* @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.
*