// SPDX-FileCopyrightText: 2020 Roberto Posenato // // SPDX-License-Identifier: LGPL-3.0-or-later package it.univr.di.labeledvalue; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import it.unimi.dsi.fastutil.ints.IntArraySet; import it.unimi.dsi.fastutil.ints.IntSet; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry; import it.unimi.dsi.fastutil.objects.ObjectArraySet; import it.unimi.dsi.fastutil.objects.ObjectSet; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.io.Serial; import java.io.Serializable; import java.util.logging.Logger; /** * Simple implementation of {@link it.univr.di.labeledvalue.LabeledIntMap} interface. *

* When creating an object it is possible to specify if the labeled values represented into the map should be maintained to the minimal equivalent ones. * * @author Roberto Posenato * @version $Rev$ * @see LabeledIntMap */ @SuppressFBWarnings(value = "HE_HASHCODE_NO_EQUALS", justification = "Equals is not necessary for this complementary class.") public class LabeledIntHierarchyMap extends AbstractLabeledIntMap { /** * Simple class to represent a labeled value in the hierarchy. * * @author posenato */ @SuppressWarnings({"CompareToUsesNonFinalVariable", "NonFinalFieldReferenceInEquals", "NonFinalFieldReferencedInHashCode"}) static class HierarchyNode implements Object2IntMap.Entry