org.eclipse.viatra.dse.util

## Class ValueComparableEObjectStringMap

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.TreeMap<org.eclipse.emf.ecore.EObject,java.lang.String>
    - - org.eclipse.viatra.dse.util.ValueComparableEObjectStringMap

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String>, java.util.NavigableMap<org.eclipse.emf.ecore.EObject,java.lang.String>, java.util.SortedMap<org.eclipse.emf.ecore.EObject,java.lang.String>

      public class ValueComparableEObjectStringMap
      extends java.util.TreeMap<org.eclipse.emf.ecore.EObject,java.lang.String>

  This custom `TreeMap` implementation enables to store `EObject`-`String` pairs sorted by values (strings). It works as expected if the map is modified in any way, hence the map will still be sorted by values on the new set of entries. It is allowed to have two entries with the same EObject key (and also with same values). The short coming of the class is that EObjects are compared to each other by their `System.identityHashCode(Object)`, which may lead to unexpected errors.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueComparableEObjectStringMap()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `put(org.eclipse.emf.ecore.EObject keyEObject, java.lang.String stringValue)`

    - ### Methods inherited from class java.util.TreeMap

      `ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, isEmpty, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove`

- - ### Constructor Detail

    - #### ValueComparableEObjectStringMap

          public ValueComparableEObjectStringMap()

  - ### Method Detail

    - #### put

          public java.lang.String put(org.eclipse.emf.ecore.EObject keyEObject,
                                      java.lang.String stringValue)

      Specified by:
        `put` in interface `java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String>`
      Overrides:
        `put` in class `java.util.TreeMap<org.eclipse.emf.ecore.EObject,java.lang.String>`