Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Collection;
import java.util.Iterator;

public class Main {
    @SuppressWarnings("rawtypes")
    public static boolean allNotIn(Collection source, Collection target) {
        if (target == null || target.size() == 0) {
            return true;
        }
        for (Iterator it = source.iterator(); it.hasNext();) {
            Object candidate = it.next();
            if (target.contains(candidate)) {
                return false;
            }
        }
        return true;
    }
}