/******************************************************************************* * Copyright (c) 2006, 2017 BEA Systems, Inc. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * wharley@bea.com - initial API and implementation * (originally in org.eclipse.jdt.apt.core) * IBM Corporation - Bug 513790 *******************************************************************************/ package org.eclipse.jdt.internal.compiler.apt.util; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * Manage a Map>, with reverse links so that it is possible to * efficiently find all T1s that have a particular T2 associated with them. * Access to the map is synchronized, so that it is possible to read and * write simultaneously from multiple threads. *

* The map permits the null value for keys nor for value elements. *

* Design invariants preserved by all operations on this map are as follows: *