
com.yahoo.vespa.jdk8compat.Collection Maven / Gradle / Ivy
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.jdk8compat;
import java.util.function.IntFunction;
/**
* Backport of new {@link java.util.Collection} methods added after JDK8
*
* @author bjorncs
*/
public interface Collection {
static T[] toArray(java.util.Collection collection, IntFunction generator) {
return collection.toArray(generator.apply(collection.size()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy