Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.*;

public class Main {
    public static <T1> List<T1> allOverlaps(Collection<T1> lst, Collection<T1> lst_) {
        List<T1> overlaps = new ArrayList<>();
        for (T1 elem : lst) {
            if (lst_.contains(elem))
                overlaps.add(elem);
        }
        return overlaps;
    }
}