Package pascal.taie.util.collection
Class Lists
java.lang.Object
pascal.taie.util.collection.Lists
Utility methods for
List
.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
Converts an iterable object to a list.static <T> List<T>
concatDistinct
(List<? extends T> list1, List<? extends T> list2) Concatenates two lists and removes duplicate items in the resulting list.static <T> List<T>
filter
(Collection<T> c, Predicate<? super T> predicate) Tests the elements in a given collection and returns a list of elements that can pass the test.static <T,
R> List<R> map
(Collection<? extends T> c, Function<T, R> mapper) Applies a mapper function on a given collection and returns the results as a list.
-
Method Details
-
map
Applies a mapper function on a given collection and returns the results as a list. The resulting list is unmodifiable. -
filter
Tests the elements in a given collection and returns a list of elements that can pass the test. The resulting list is unmodifiable. -
asList
Converts an iterable object to a list. -
concatDistinct
Concatenates two lists and removes duplicate items in the resulting list.
-