Class Utils
java.lang.Object
org.apache.druid.java.util.common.collect.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> booleanstatic <T> Iterator<T> mergeSorted(Iterable<? extends Iterator<? extends T>> sortedIterators, Comparator<? super T> comparator) Like Guava'sIterators.mergeSorted(Iterable, Comparator), but avoids calling next() on any iterator prior to returning the value returned by the previous call to next().static <T> List<T> nullableListOf(T... elements) static Stringstatic <K,V> Map <K, V> zipMapPartial(Iterable<K> keys, Iterable<V> values) Create a Map from iterables of keys and values.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
zipMapPartial
Create a Map from iterables of keys and values. If there are more keys than values, or more values than keys, the excess will be omitted. -
nullableListOf
-
isPrefix
-
safeObjectClassGetName
-
mergeSorted
public static <T> Iterator<T> mergeSorted(Iterable<? extends Iterator<? extends T>> sortedIterators, Comparator<? super T> comparator) Like Guava'sIterators.mergeSorted(Iterable, Comparator), but avoids calling next() on any iterator prior to returning the value returned by the previous call to next(). This is important when merging iterators that reuse container objects across calls to next(). If the Iterators areCloseableIterator, useCloseableIterators.mergeSorted(java.util.List<? extends org.apache.druid.java.util.common.parsers.CloseableIterator<? extends T>>, java.util.Comparator<T>)instead.
-