public class StringCollectionUtil extends Object
| Constructor and Description |
|---|
StringCollectionUtil()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
removeMatching(Collection
Removes all values in the subject collection that are matched by at least one of a collection of regular expressions.
|
static void |
removeMatching(Collection
Removes all values in the subject collection that are matched by at least one of a collection of regular expressions.
|
static void |
retainMatching(Collection
Retains all values in the subject collection that are matched by at least one of a collection of regular expressions.
|
static void |
retainMatching(Collection
Retains all values in the subject collection that are matched by at least one of a collection of regular expressions.
|
public static void retainMatching(Collection<String > values, String ... patterns)
This method is a convenience overload for retainMatching(Collection, Collection).
values - subject value collection
patterns - patterns to match
public static void retainMatching(Collection<String > values, Collection <String > patterns)
The semantics of this method are conceptually similar to Collection, but uses pattern matching instead of exact matching.
values - subject value collection
patterns - patterns to match
public static void removeMatching(Collection<String > values, String ... patterns)
This method is a convenience overload for removeMatching(Collection, Collection).
values - subject value collection
patterns - patterns to match
public static void removeMatching(Collection<String > values, Collection <String > patterns)
The semantics of this method are conceptually similar to Collection, but uses pattern matching instead of exact matching.
values - subject value collection
patterns - patterns to match