@Override
		public boolean remove(Object o) {
			try {
				@SuppressWarnings("unchecked")
				Node n = (Node) o;
				Node rm = nodeMap.get(n.key);
				if (rm == n) {
					n.remove();
					nodeMap.remove(n.key);
					return true;
				}
				if (Objects.equals(n.val, rm.val)) {
					nodeMap.remove(rm.key);
					rm.remove();
					return true;
				}
				return false;
			}
			catch (ClassCastException e) {
				return false;
			}
		}
Inserts (by copy) the entry into the owning map
Ghidra/Framework/Generic/src/main/java/ghidra/generic/util/datastruct/TreeValueSortedMap.java