Package org.eclipse.epsilon.flexmi.yaml
Class LocatedLinkedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.eclipse.epsilon.flexmi.yaml.LocatedLinkedHashMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,,V> SequencedMap<K,,V> LocatedMap<K,V>
Extended version of a map which keeps track of the YAML representation
tree node tuple it came from (for its location).
Note: this class is only meant to be used during the loading of a YAML
document. It assumes the only changes made to the map are to put keys
during the loading process.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()org.yaml.snakeyaml.nodes.MappingNodeorg.yaml.snakeyaml.nodes.NodeTuplegetLocation(K key) putWithLocation(K key, org.yaml.snakeyaml.nodes.NodeTuple node, V value) voidsetLocation(org.yaml.snakeyaml.nodes.MappingNode mn) Methods inherited from class java.util.LinkedHashMap
containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
LocatedLinkedHashMap
public LocatedLinkedHashMap() -
LocatedLinkedHashMap
public LocatedLinkedHashMap(int initialCapacity)
-
-
Method Details
-
putWithLocation
- Specified by:
putWithLocationin interfaceLocatedMap<K,V>
-
getLocation
- Specified by:
getLocationin interfaceLocatedMap<K,V>
-
clear
public void clear() -
remove
-
getLocation
public org.yaml.snakeyaml.nodes.MappingNode getLocation()- Specified by:
getLocationin interfaceLocatedMap<K,V>
-
setLocation
public void setLocation(org.yaml.snakeyaml.nodes.MappingNode mn) - Specified by:
setLocationin interfaceLocatedMap<K,V>
-