Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

public class Main {
    @SafeVarargs
    public static <T> Set<T> setOfNotNull(T... objects) {
        return Arrays.stream(objects).filter(obj -> obj != null).collect(Collectors.toSet());
    }
}