-
public final class CollectionsKt
-
-
Method Summary
Modifier and Type Method Description final <K extends Any, V extends Any> Map<K, V>mapNotNullValues(Pair<K, V> pairs)Return a map with only not null values. final <T extends Any, K extends Any, V extends Any> List<Pair<K, V>>mapNotNullValues(Iterable<T> $self, Function1<T, Pair<K, V>> transform)Map not null values of the Pair results of the specified transformation. final <T extends Any> Set<T>toSet(Enumeration<T> $self)Extract a Set from an Enumeration. final <T extends Any> List<T>toList(Iterator<T> $self)Extract a List from an Iterator. final <T extends Any> List<T>toSafeList(Iterator<T> $self)Extract safely a List from an Iterator - if an [Iterator.next()) call throws an error, ignore this call. final <T extends Any> LongsumByLong(Iterable<T> $self, Function1<T, Long> selector)Returns the sum of all values produced by selector function applied to each element in the collection. -
-
Method Detail
-
mapNotNullValues
final <K extends Any, V extends Any> Map<K, V> mapNotNullValues(Pair<K, V> pairs)
Return a map with only not null values.
-
mapNotNullValues
final <T extends Any, K extends Any, V extends Any> List<Pair<K, V>> mapNotNullValues(Iterable<T> $self, Function1<T, Pair<K, V>> transform)
Map not null values of the Pair results of the specified transformation.
-
toSet
final <T extends Any> Set<T> toSet(Enumeration<T> $self)
Extract a Set from an Enumeration.
-
-
-
-