Class CollectionUtil
java.lang.Object
org.eclipse.net4j.util.collection.CollectionUtil
Various static helper methods.
- Since:
- 3.5
- Author:
- Eike Stepper
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> boolean
addNotNull
(Collection<? super T> c, T e) static <K,
V> V compute
(Map<K, V> map, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) static <T> Iterator<T>
static <T> T
first
(Collection<? extends T> c) static <K,
V> List<K> removeAll
(Map<K, V> map, BiPredicate<K, V> predicate) static <T> Set<T>
setOf
(Collection<? extends T> c) static <NODE> List<NODE>
topologicalSort
(Collection<NODE> nodes, Function<NODE, Collection<NODE>> edgeProvider) static <NODE> List<NODE>
topologicalSort
(Collection<NODE> nodes, Function<NODE, Collection<NODE>> edgeProvider, boolean reverse)
-
Method Details
-
dump
-
topologicalSort
public static <NODE> List<NODE> topologicalSort(Collection<NODE> nodes, Function<NODE, Collection<NODE>> edgeProvider) - Since:
- 3.25
-
topologicalSort
public static <NODE> List<NODE> topologicalSort(Collection<NODE> nodes, Function<NODE, Collection<NODE>> edgeProvider, boolean reverse) - Since:
- 3.25
-
addNotNull
- Since:
- 3.16
-
setOf
- Since:
- 3.16
-
first
- Since:
- 3.16
-
removeAll
- Since:
- 3.16
-
compute
public static <K,V> V compute(Map<K, V> map, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) - Since:
- 3.16
-