class AddressSet implements AddressSetView {

	@Override
	public final AddressSet intersect(AddressSetView addrSet) {
		if (addrSet == null || addrSet.isEmpty() || isEmpty()) {
			return new AddressSet();
		}
		int thisSize = getNumAddressRanges();
		int thatSize = addrSet.getNumAddressRanges();

		// if this address set has fewer ranges, swap for possible more efficient computation
		if (thisSize < thatSize) {
			return addrSet.intersect(this);
		}

		if (useLinearAlgorithm(addrSet)) {
			return intersectLinear(addrSet);
		}
		return intersectBinary(addrSet);
	}

	public  AddressSet();
	@Deprecated public  AddressSet(AddressFactory factory);
	public  AddressSet(AddressRange range);
	@Deprecated public  AddressSet(AddressFactory factory, AddressRange range);
	public  AddressSet(Address start, Address end);
	@Deprecated public  AddressSet(AddressFactory factory, Address start, Address end);
	public  AddressSet(Program program, Address start, Address end);
	@Deprecated public  AddressSet(AddressFactory factory, AddressSetView set);
	public  AddressSet(AddressSetView set);
	@Deprecated public  AddressSet(AddressFactory factory, Address addr);
	public  AddressSet(Address addr);

}