public final class CollectionSupport extends Object
| Modifier | Constructor and Description |
|---|---|
private |
CollectionSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> boolean |
addIf(Collection<? super T> target,
Collection<T> elements,
Predicate<? super T> predicate)
Adds a collection of elements to a collection for each element that meets the requirements of a given predicate.
|
static <T> boolean |
addIf(Collection<? super T> target,
Collection<T> elements,
Predicate<? super T> predicate,
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 <T> boolean |
addIf(Collection<? super T> target,
T element,
Predicate<? super T> predicate)
Adds an element to a collection if it meets the requirements of a given predicate.
|
static <T> boolean |
addIf(Collection<? super T> target,
T element,
Predicate<? super T> predicate,
Function<? super T,T> elementPreprocessor)
Adds an element to a collection if it meets the requirements of a given predicate.
|
static <T> boolean |
removeIf(Collection<T> target,
Collection<T> elements,
Predicate<? super T> predicate)
Removes a collection of elements to a collection for each element that meets the requirements of a given
predicate.
|
static <T> boolean |
removeIf(Collection<T> target,
Collection<T> elements,
Predicate<? super T> predicate,
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 <T> boolean |
removeIf(Collection<T> target,
T element,
Predicate<? super T> predicate)
Removes an element to a collection if it meets the requirements of a given predicate.
|
static <T> boolean |
removeIf(Collection<T> target,
T element,
Predicate<? super T> predicate,
Function<? super T,T> elementPreprocessor)
Removes an element to a collection if it meets the requirements of a given predicate.
|
public static <T> boolean addIf(@Nonnull Collection<? super T> target, @Nullable T element, @Nonnull 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 collectionpublic static <T> boolean addIf(@Nonnull Collection<? super T> target, @Nullable T element, @Nonnull Predicate<? super T> predicate, @Nonnull 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
collectionpublic static <T> boolean addIf(@Nonnull Collection<? super T> target, @Nullable Collection<T> elements, @Nonnull 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 collectionpublic static <T> boolean addIf(@Nonnull Collection<? super T> target, @Nullable Collection<T> elements, @Nonnull Predicate<? super T> predicate, @Nonnull 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
collectionpublic static <T> boolean removeIf(@Nonnull Collection<T> target, @Nullable T element, @Nonnull 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 collectionpublic static <T> boolean removeIf(@Nonnull Collection<T> target, @Nullable T element, @Nonnull Predicate<? super T> predicate, @Nonnull 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
collectionpublic static <T> boolean removeIf(@Nonnull Collection<T> target, @Nullable Collection<T> elements, @Nonnull 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 collectionpublic static <T> boolean removeIf(@Nonnull Collection<T> target, @Nullable Collection<T> elements, @Nonnull Predicate<? super T> predicate, @Nonnull 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
collectionCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.