Class Collections

java.lang.Object
org.mapstruct.ap.internal.util.Collections

public class Collections extends Object
Provides utility methods around collections.
Author:
Gunnar Morling
  • Method Details

    • asSet

      @SafeVarargs public static <T> Set<T> asSet(T... elements)
    • asSet

      @SafeVarargs public static <T> Set<T> asSet(Collection<T> collection, T... elements)
    • asSet

      @SafeVarargs public static <T> Set<T> asSet(Collection<T> collection, Collection<T>... elements)
    • first

      public static <T> T first(Collection<T> collection)
    • last

      public static <T> T last(List<T> list)
    • join

      public static <T> List<T> join(List<T> a, List<T> b)
    • first

      public static <K, V> Map.Entry<K,V> first(Map<K,V> map)
    • firstValue

      public static <K, V> V firstValue(Map<K,V> map)
    • firstKey

      public static <K, V> K firstKey(Map<K,V> map)