blob: b2c998bb716562530d0476555422616cd2ea488e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// 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.Arrays;
import java.util.HashSet;
/**
* Backport of new {@link java.util.Set} methods added after JDK8
*
* @author bjorncs
*/
public interface Set {
@SafeVarargs
@SuppressWarnings("varargs")
static <E> java.util.Set<E> of(E... elements) {
return new HashSet<>(Arrays.asList(elements));
}
}
|