public class Collections extends Object
Modifier and Type | Method and Description |
---|---|
static <C> List<List<C>> |
clusterize(List<C> elements,
Comparator<C> comp)
A very simple clusterizer which traverses the given elements in order.
|
static <E> List<E> |
flatten(Collection<? extends Collection<E>> src) |
static <E> void |
flatten(Collection<? extends Collection<E>> src,
Collection<E> dst) |
public static <C> List<List<C>> clusterize(List<C> elements, Comparator<C> comp)
Comparator.compare(Object, Object)
. Otherwise a new cluster is started.elements
- the elements to clustercomp
- the comparator used to compare nucleus and elementpublic static <E> List<E> flatten(Collection<? extends Collection<E>> src)
public static <E> void flatten(Collection<? extends Collection<E>> src, Collection<E> dst)
Copyright © 2024 levigo holding gmbh. All rights reserved.