All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.lib.collections.Logic Maven / Gradle / Ivy

Go to download

A main program (executable JAR) that will listen to port 29998. At first, it can only answer that it is an Envoy (a limited agent). The only function it supports is installing a -runpath. It will then create a framework + agent and transfer the connection to the just installed agent who will then install the bundles. This JAR is a main command for JPM called bndremote. In JPM, it will start up with debug enabled. This JAR does some highly complicated class loading wizardy to ensure that it does not enforce any constraints on the -runpath.

The newest version!
package aQute.lib.collections;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class Logic {
	private Logic() {}

	@SafeVarargs
	public static  Collection retain(Collection first, Collection... sets) {
		Set result = new HashSet<>(first);
		for (Collection set : sets) {
			result.retainAll(set);
		}
		return result;
	}

	@SafeVarargs
	public static  Collection remove(Collection first, Collection... sets) {
		Set result = new HashSet<>(first);
		for (Collection set : sets) {
			result.removeAll(set);
		}
		return result;
	}

	@SafeVarargs
	public static  boolean hasOverlap(Collection source, Collection... toBeChecked) {
		for (T t : source) {
			for (Collection l : toBeChecked) {
				for (T r : l) {
					if (t.equals(r))
						return true;
				}
			}
		}
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy