private synchronized void
removeElement(Name name, int type) {
	Object types = data.get(name);
	if (types == null) {
		return;
	}
	if (types instanceof List) {
		List list = (List) types;
		for (int i = 0; i < list.size(); i++) {
			Element elt = (Element) list.get(i);
			if (elt.getType() == type) {
				list.remove(i);
				if (list.size() == 0)
					data.remove(name);
				return;
			}
		}
	} else {
		Element elt = (Element) types;
		if (elt.getType() != type)
			return;
		data.remove(name);
	}
}
Creates a Cache which initially contains all records in the specified file.
src/main/java/core/org/xbill/DNS/Cache.java