package org.opendaylight.yangtools.util;
import com.google.common.base.Preconditions;
-import com.google.common.collect.Iterables;
import com.romix.scala.collection.concurrent.TrieMap;
-
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
*/
if (size == 0) {
LOG.trace("Reducing input {} to an empty map", input);
- return Collections.<K, V>emptyMap();
+ return Collections.emptyMap();
}
/*
* map.
*/
if (useSingleton && size == 1) {
- final Entry<K, V> e = Iterables.getOnlyElement(input.entrySet());
+ final Entry<K, V> e = input.entrySet().iterator().next();
final Map<K, V> ret = Collections.singletonMap(e.getKey(), e.getValue());
LOG.trace("Reducing input {} to singleton map {}", input, ret);
return ret;