Class Lists

java.lang.Object
pascal.taie.util.collection.Lists

public final class Lists extends Object
Utility methods for List.
  • Method Details

    • map

      public 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. The resulting list is unmodifiable.
    • filter

      public 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. The resulting list is unmodifiable.
    • asList

      public static <T> List<T> asList(Iterable<T> iterable)
      Converts an iterable object to a list.
    • concatDistinct

      public static <T> List<T> concatDistinct(List<? extends T> list1, List<? extends T> list2)
      Concatenates two lists and removes duplicate items in the resulting list.