[utilities COMMIT] /java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSuppo...

noreply at shibboleth.net noreply at shibboleth.net
Mon Nov 4 03:56:00 EST 2013


Author: rdw
Date: Mon Nov  4 03:56:00 2013
New Revision: 475

URL: http://svn.shibboleth.net/view/utilities?rev=475&view=rev
Log:
IDP-316 Fixing types in a class in java-support and as a result finish tidy up of up AdPAttribute <AttributeValue> becomes <AttributeValue<?>>

Modified:
    java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java

Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java?rev=475&r1=474&r2=475&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java Mon Nov  4 03:56:00 2013
@@ -46,7 +46,7 @@
      * 
      * @return true if the given element was added to the given collection
      */
-    public static <T> boolean addIf(@Nonnull final Collection<T> target, @Nullable final T element,
+    public static <T> boolean addIf(@Nonnull final Collection<? super T> target, @Nullable final T element,
             @Nonnull Predicate<? super T> predicate) {
         return addIf(target, element, predicate, Functions.<T> identity());
     }
@@ -63,7 +63,7 @@
      * 
      * @return true if the given element was added to the given collection
      */
-    public static <T> boolean addIf(@Nonnull final Collection<T> target, @Nullable final T element,
+    public static <T> boolean addIf(@Nonnull final Collection<? super T> target, @Nullable final T element,
             @Nonnull Predicate<? super T> predicate, @Nonnull Function<? super T, T> elementPreprocessor) {
         Constraint.isNotNull(target, "Target collection can not be null");
         Constraint.isNotNull(predicate, "Element predicate can not be null");
@@ -90,7 +90,7 @@
      * 
      * @return true if the given target had elements added to it
      */
-    public static <T> boolean addIf(@Nonnull final Collection<T> target, @Nullable final Collection<T> elements,
+    public static <T> boolean addIf(@Nonnull final Collection<? super T> target, @Nullable final Collection<T> elements,
             @Nonnull Predicate<? super T> predicate) {
         return addIf(target, elements, predicate, Functions.<T> identity());
     }
@@ -107,7 +107,7 @@
      * 
      * @return true if the given target had elements added to it
      */
-    public static <T> boolean addIf(@Nonnull final Collection<T> target, @Nullable final Collection<T> elements,
+    public static <T> boolean addIf(@Nonnull final Collection<? super T> target, @Nullable final Collection<T> elements,
             @Nonnull Predicate<? super T> predicate, @Nonnull Function<? super T, T> elementPreprocessor) {
         if (elements == null) {
             return false;



More information about the commits mailing list