Class CollectionUtils

java.lang.Object
io.karma.kommons.collection.CollectionUtils

@API(status=STABLE) public final class CollectionUtils extends Object
Since:
02/02/2022
  • Method Details

    • asList

      public static <T> List<T> asList(Collection<T> collection)
    • fromIterator

      public static <T, C extends Collection<T>> C fromIterator(Iterator<? extends T> iterator, Supplier<? extends C> factory)
    • fromIterable

      public static <T, C extends Collection<T>> C fromIterable(Iterable<? extends T> iterable, Supplier<? extends C> factory)
    • collectFutures

      public static <T, C extends Collection<T>> C collectFutures(Collection<? extends Future<? extends T>> futures, Supplier<? extends C> factory)
    • flatMapFutures

      public static <T, C extends Collection<T>> C flatMapFutures(Collection<? extends Future<? extends Collection<? extends T>>> futures, Supplier<? extends C> factory)
    • reverseMap

      @Nullable public static <K, V, M extends Map<V, K>> M reverseMap(@Nullable @Nullable Map<? extends K,? extends V> map, @Nullable @Nullable Supplier<? extends Map<? extends V,? extends K>> factory)
    • reverseMap

      @Nullable public static <K, V, M extends Map<V, K>> M reverseMap(@Nullable @Nullable Map<? extends K,? extends V> map)