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.*;

public class Main {

    @SuppressWarnings("unchecked")
    public static <T> Collection<T> unique(Collection<T> c, Collection<T> result) {
        if (c == null) {
            return result;
        }
        Set<T> s = new LinkedHashSet<T>(c);
        result.addAll(s);
        return result;
    }
}