Class LabeledALabelIntTreeMap.LabeledALabelIntTreeMapView
java.lang.Object
it.univr.di.labeledvalue.LabeledALabelIntTreeMap
it.univr.di.labeledvalue.LabeledALabelIntTreeMap.LabeledALabelIntTreeMapView
- All Implemented Interfaces:
Serializable
- Enclosing class:
LabeledALabelIntTreeMap
public static class LabeledALabelIntTreeMap.LabeledALabelIntTreeMapView
extends LabeledALabelIntTreeMap
A read-only view of a LabeledALabelIntTreeMap object.
- Version:
- $Rev: 1169 $
- Author:
- posenato
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class LabeledALabelIntTreeMap
LabeledALabelIntTreeMap.LabeledALabelIntTreeMapViewModifier and TypeClassDescriptionstatic classA read-only view of a LabeledALabelIntTreeMap object. -
Field Summary
Fields inherited from class LabeledALabelIntTreeMap
labelCharsRE, map, patternLabelCharsREModifier and TypeFieldDescription(package private) static final StringKeyword \w because it is necessary to accept also node names!(package private) it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<ALabel, LabeledIntMap> Data structure.(package private) static final PatternMatcher for RE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmergeTriple(Label l, ALabel p, int i) Object Read-only.booleanmergeTriple(Label newLabel, ALabel newAlabel, int newValue, boolean force) Object Read-only.booleanmergeTriple(String label, ALabel p, int i) Object Read-only.booleanmergeTriple(String label, ALabel p, int i, boolean force) Object Read-only.booleanObject Read-only.intObject Read-only.intsize()The view shares the map of the object it views but not its cached count, which stays 0 -- so it has to compute the size, and computing it also keeps the answer live if the viewed object changes.Methods inherited from class LabeledALabelIntTreeMap
aLabelSet, alreadyRepresents, clear, entryAsString, entrySet, entrySet, equals, getMinValue, getMinValue, getMinValueConsistentWith, getValue, hashCode, isEmpty, labelSet, labelSet, parse, remove, toString, unmodifiable, unmodifiableModifier and TypeMethodDescriptionfinal it.unimi.dsi.fastutil.objects.ObjectSet<ALabel> final booleanalreadyRepresents(Label newLabel, ALabel newAlabel, int newValue) final voidclear()static StringentryAsString(Label label, int value, ALabel nodeName) Utility.final it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.objects.Object2ObjectMap.Entry<ALabel, it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<Label>>> entrySet()Important The returned set is a view of the map.final it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<Label>> The returned set is a view of the map.final booleanfinal it.unimi.dsi.fastutil.objects.Object2ObjectMap.Entry<Label, it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<ALabel>> final it.unimi.dsi.fastutil.objects.Object2IntMap.Entry<Label> Returns a copy of the entry containing the min value associated with ALabelp.final intReturns the value associated with(l, p)if it exists, otherwise the minimal value among all labels consistent with(l, p).final intfinal inthashCode()final booleanisEmpty()final it.unimi.dsi.fastutil.objects.ObjectSet<Label> labelSet()final it.unimi.dsi.fastutil.objects.ObjectSet<Label> static LabeledALabelIntTreeMapparse(String arg, ALabelAlphabet alphabet, Class<? extends LabeledIntMap> labeledValueMapImple) Parse a string representing a LabeledValueTreeMap and return an object containing the labeled values represented by the string.booleanfinal StringtoString()Returns a string representing the content of the map, i.e., "{[⟨entry⟩ ]*}", where each ⟨entry⟩ is written byLabeledALabelIntTreeMap.entryAsString(Label, int, ALabel).final LabeledIntMapunmodifiable(ALabel aleph)
-
Constructor Details
-
LabeledALabelIntTreeMapView
- Parameters:
inputMap- the input map
-
-
Method Details
-
size
public int size()The view shares the map of the object it views but not its cached count, which stays 0 -- so it has to compute the size, and computing it also keeps the answer live if the viewed object changes. Before this override, every view reported size 0, and thereforeLabeledALabelIntTreeMap.isEmpty()true, whatever it contained.- Overrides:
sizein classLabeledALabelIntTreeMap- Returns:
- the number of labeled values in the viewed map
-
mergeTriple
Object Read-only. It does nothing.- Overrides:
mergeTriplein classLabeledALabelIntTreeMap- Parameters:
newLabel- aLabelobject.newAlabel- a case name.newValue- the new value.force- true if the value has to be stored without label optimization.- Returns:
- true if the triple is stored, false otherwise.
-
mergeTriple
Object Read-only. It does nothing.- Overrides:
mergeTriplein classLabeledALabelIntTreeMap- Parameters:
l- theLabelobject.p- theStringobject.i- the value to merge.- Returns:
- see
LabeledALabelIntTreeMap.mergeTriple(Label, ALabel, int, boolean) - See Also:
-
mergeTriple
Object Read-only. It does nothing.- Overrides:
mergeTriplein classLabeledALabelIntTreeMap- Parameters:
label- aStringobject.p- aStringobject.i- the new value.- Returns:
- see
LabeledALabelIntTreeMap.mergeTriple(String, ALabel, int, boolean) - See Also:
-
mergeTriple
Object Read-only. It does nothing.- Overrides:
mergeTriplein classLabeledALabelIntTreeMap- Parameters:
label- aStringobject.p- aStringobject.i- the new value.force- true if the value has to be stored without label optimization.- Returns:
- true if the triple is stored, false otherwise.
-
putTriple
-
remove
Object Read-only. It does nothing.- Overrides:
removein classLabeledALabelIntTreeMap- Parameters:
l- aLabelobject.p- aALabelobject.- Returns:
- the old value if it exists,
Constants.INT_NULLotherwise.
-