[java-support] branch master updated: Remove unneeded immutable collection methods.
Scott Cantor
cantor.2 at osu.edu
Fri Nov 1 16:13:24 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=eef270556c981816a0890075789c83addadc7713
The following commit(s) were added to refs/heads/master by this push:
new eef2705 Remove unneeded immutable collection methods.
eef2705 is described below
commit eef270556c981816a0890075789c83addadc7713
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Nov 1 16:13:22 2019 -0400
Remove unneeded immutable collection methods.
---
.../java/support/collection/CollectionSupport.java | 66 ----------------------
1 file changed, 66 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java b/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java
index c8c1648..bc93eb7 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/collection/CollectionSupport.java
@@ -18,22 +18,12 @@
package net.shibboleth.utilities.java.support.collection;
import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
import java.util.function.Function;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
-import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.logic.Constraint;
/** Helper methods for working with collections of objects. */
@@ -43,62 +33,6 @@ public final class CollectionSupport {
private CollectionSupport() {
}
-
- /**
- * Builds an immutable list containing the source collection, allowing for a null collection.
- *
- * @param <T> source type
- * @param source objects to populate into list, or null
- *
- * @return An immutable list containing the source objects
- *
- * @since 8.0.0
- */
- @Nonnull @NotLive @Unmodifiable public static <T> List<T> buildImmutableList(
- @Nullable final Collection<? extends T> source) {
- if (source != null) {
- return ImmutableList.copyOf(source);
- }
- return Collections.emptyList();
- }
-
- /**
- * Builds an immutable set containing the source collection, allowing for a null collection.
- *
- * @param <T> source type
- * @param source objects to populate into set, or null
- *
- * @return An immutable set containing the source objects
- *
- * @since 8.0.0
- */
- @Nonnull @NotLive @Unmodifiable public static <T> Set<T> buildImmutableSet(
- @Nullable final Collection<? extends T> source) {
- if (source != null) {
- return ImmutableSet.copyOf(source);
- }
- return Collections.emptySet();
- }
-
- /**
- * Builds an immutable set containing the source collection, allowing for a null collection.
- *
- * @param <K> key type
- * @param <V> value type
- * @param source objects to populate into map, or null
- *
- * @return An immutable map containing the source objects
- *
- * @since 8.0.0
- */
- @Nonnull @NotLive @Unmodifiable public static <K,V> Map<K,V> buildImmutableMap(
- @Nullable final Map<? extends K, ? extends V> source) {
- if (source != null) {
- return ImmutableMap.copyOf(source);
- }
- return Collections.emptyMap();
- }
-
/**
* Adds an element to a collection if it meets the requirements of a given predicate.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list