Package org.sosy_lab.common.collect
Class MoreCollectors
java.lang.Object
org.sosy_lab.common.collect.MoreCollectors
Additional
Collector implementation, similar to Collectors.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Collector<T,?, ImmutableList<T>> Deprecated.static <T> Collector<T,?, ImmutableSet<T>> Deprecated.static <T> Collector<T,?, PersistentLinkedList<T>> Deprecated.
-
Method Details
-
toPersistentLinkedList
@Deprecated @InlineMe(replacement="PersistentLinkedList.toPersistentLinkedList()", imports="org.sosy_lab.common.collect.PersistentLinkedList") public static <T> Collector<T,?, toPersistentLinkedList()PersistentLinkedList<T>> Deprecated.Return aCollectorthat producesPersistentLinkedLists. -
toImmutableList
@Deprecated @InlineMe(replacement="ImmutableList.toImmutableList()", imports="com.google.common.collect.ImmutableList") public static <T> Collector<T,?, toImmutableList()ImmutableList<T>> Deprecated.Return aCollectorthat producesImmutableLists.Prefer to use this over
Collectors.toList()! The latter does neither guarantee mutability nor immutability, so if you want immutability, use this method, and if you need mutability, useCollectors.toCollection(ArrayList::new). -
toImmutableSet
@Deprecated @InlineMe(replacement="ImmutableSet.toImmutableSet()", imports="com.google.common.collect.ImmutableSet") public static <T> Collector<T,?, toImmutableSet()ImmutableSet<T>> Deprecated.Return aCollectorthat producesImmutableSets. Just like the usual methods for ImmutableSets, this collector guarantees to keep the order.Prefer to use this over
Collectors.toSet()! The latter does neither guarantee mutability nor immutability, so if you want immutability, use this method, and if you need mutability, useCollectors.toCollection(HashSet::new).
-
ImmutableList.toImmutableList()