|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.collection.CollectionSupport
public final class CollectionSupport
Helper methods for working with collections of objects.
| Constructor Summary | |
|---|---|
private |
CollectionSupport()
Constructor. |
| Method Summary | ||
|---|---|---|
static
|
addIf(Collection<T> target,
Collection<T> elements,
com.google.common.base.Predicate<? super T> predicate)
Adds a collection of elements to a collection for each element that meets the requirements of a given predicate. |
|
static
|
addIf(Collection<T> target,
Collection<T> elements,
com.google.common.base.Predicate<? super T> predicate,
com.google.common.base.Function<? super T,T> elementPreprocessor)
Adds a collection of elements to a collection for each element that meets the requirements of a given predicate. |
|
static
|
addIf(Collection<T> target,
T element,
com.google.common.base.Predicate<? super T> predicate)
Adds an element to a collection if it meets the requirements of a given predicate. |
|
static
|
addIf(Collection<T> target,
T element,
com.google.common.base.Predicate<? super T> predicate,
com.google.common.base.Function<? super T,T> elementPreprocessor)
Adds an element to a collection if it meets the requirements of a given predicate. |
|
static
|
removeIf(Collection<T> target,
Collection<T> elements,
com.google.common.base.Predicate<? super T> predicate)
Removes a collection of elements to a collection for each element that meets the requirements of a given predicate. |
|
static
|
removeIf(Collection<T> target,
Collection<T> elements,
com.google.common.base.Predicate<? super T> predicate,
com.google.common.base.Function<? super T,T> elementPreprocessor)
Removes a collection of elements to a collection for each element that meets the requirements of a given predicate. |
|
static
|
removeIf(Collection<T> target,
T element,
com.google.common.base.Predicate<? super T> predicate)
Removes an element to a collection if it meets the requirements of a given predicate. |
|
static
|
removeIf(Collection<T> target,
T element,
com.google.common.base.Predicate<? super T> predicate,
com.google.common.base.Function<? super T,T> elementPreprocessor)
Removes an element to a collection if it meets the requirements of a given predicate. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private CollectionSupport()
| Method Detail |
|---|
public static <T> boolean addIf(@Nonnull
Collection<T> target,
@Nullable
T element,
@Nonnull
com.google.common.base.Predicate<? super T> predicate)
T - type of element in the collectiontarget - collection to which elements will be addedelement - element that may be added to the collectionpredicate - predicate the given element must meet in order to be added to the given collection
public static <T> boolean addIf(@Nonnull
Collection<T> target,
@Nullable
T element,
@Nonnull
com.google.common.base.Predicate<? super T> predicate,
@Nonnull
com.google.common.base.Function<? super T,T> elementPreprocessor)
T - type of element in the collectiontarget - collection to which elements will be addedelement - element that may be added to the collectionpredicate - predicate the given element must meet in order to be added to the given collectionelementPreprocessor - function applied to element prior to predicate evaluation and being added the
collection
public static <T> boolean addIf(@Nonnull
Collection<T> target,
@Nullable
Collection<T> elements,
@Nonnull
com.google.common.base.Predicate<? super T> predicate)
T - type of element in the collectiontarget - collection to which elements will be addedelements - elements that may be added to the collectionpredicate - predicate the given element must meet in order to be added to the given collection
public static <T> boolean addIf(@Nonnull
Collection<T> target,
@Nullable
Collection<T> elements,
@Nonnull
com.google.common.base.Predicate<? super T> predicate,
@Nonnull
com.google.common.base.Function<? super T,T> elementPreprocessor)
T - type of element in the collectiontarget - collection to which elements will be addedelements - elements that may be added to the collectionpredicate - predicate the given element must meet in order to be added to the given collectionelementPreprocessor - function applied to element prior to predicate evaluation and being added the
collection
public static <T> boolean removeIf(@Nonnull
Collection<T> target,
@Nullable
T element,
@Nonnull
com.google.common.base.Predicate<? super T> predicate)
T - type of element in the collectiontarget - collection to which elements will be removedelement - element that may be removed from the collectionpredicate - predicate the given element must meet in order to be removed from the given collection
public static <T> boolean removeIf(@Nonnull
Collection<T> target,
@Nullable
T element,
@Nonnull
com.google.common.base.Predicate<? super T> predicate,
@Nonnull
com.google.common.base.Function<? super T,T> elementPreprocessor)
T - type of element in the collectiontarget - collection to which elements will be removedelement - element that may be removed from the collectionpredicate - predicate the given element must meet in order to be removed from the given collectionelementPreprocessor - function applied to element prior to predicate evaluation and being removed from the
collection
public static <T> boolean removeIf(@Nonnull
Collection<T> target,
@Nullable
Collection<T> elements,
@Nonnull
com.google.common.base.Predicate<? super T> predicate)
T - type of element in the collectiontarget - collection to which elements will be removedelements - elements that may be removed from the collectionpredicate - predicate the given element must meet in order to be removed from the given collection
public static <T> boolean removeIf(@Nonnull
Collection<T> target,
@Nullable
Collection<T> elements,
@Nonnull
com.google.common.base.Predicate<? super T> predicate,
@Nonnull
com.google.common.base.Function<? super T,T> elementPreprocessor)
T - type of element in the collectiontarget - collection to which elements will be removedelements - elements that may be removed from the collectionpredicate - predicate the given element must meet in order to be removed from the given collectionelementPreprocessor - function applied to element prior to predicate evaluation and being removed from the
collection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||