// SPDX-FileCopyrightText: 2020 Roberto Posenato // // SPDX-License-Identifier: LGPL-3.0-or-later package it.univr.di.cstnu.graph; import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry; import it.unimi.dsi.fastutil.objects.Object2ObjectMap; import it.unimi.dsi.fastutil.objects.ObjectSet; import it.univr.di.labeledvalue.ALabel; import it.univr.di.labeledvalue.Label; import it.univr.di.labeledvalue.LabeledALabelIntTreeMap; import javax.annotation.Nonnull; /** * Represents the common behavior of an edge that can have upper-case value(s) and a lower-Case one. *
* In CSTNUs, each edge can have more upper-case and one lower-case value. *
* In CSTNPSUs, each edge can have more upper-case and more lower-case values. *
* So, this interface represents on the common part. *
* In order to promote greater efficiency, some methods return a view of the internal data structures (they are all methods that return a set of {@code Entry}). * Such view could be dangerous because it could be modified directly (don't do that!) Such methods must be used only to read-only scan the labeled values or * labeled values' labels in an efficiente way. Moreover, such views are not more valid if a value is added to or removed from the edge. * * @author posenato * @version $Rev$ */ @SuppressWarnings("UnusedReturnValue") public interface BasicCSTNUEdge extends CSTNEdge { /** * Clears the labeled lower case values. For CSTNU there is always only one value, but for some extensions can be more. */ void clearLowerCaseValue(); /** * Clears all upper case labeled values. */ void clearUpperCaseValues(); /** * Don't use this set for a scanning that requires to modify the internal map because otherwise this set becomes not valid at first modification. * * @return the set of all labeled values and all labeled upper-case ones. The labeled values have ALabel empty. */ ObjectSet>> getAllUpperCaseAndLabeledValues(); /** * @param aLabel the upper-case label * * @return the set of all labels associated to upper-case label aLabel if any, empty set otherwise. */ ObjectSet