class ContainableElementsMapAndComparator
extends java.lang.Object
implements java.util.Comparator<net.ssehub.easy.varModel.model.ContainableModelElement>
put(EObject, Comment, ContainableModelElement).EObjects using
setIndex(EObject, int).Comparator
property of this class.| Modifier and Type | Class and Description |
|---|---|
private static class |
ContainableElementsMapAndComparator.Data
Stores internal data to be assigned to a key.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.Object,ContainableElementsMapAndComparator.Data> |
map
Stores the
EObject-ContainableElementsMapAndComparator.Data or
ContainableModelElement-ContainableElementsMapAndComparator.Data mappings. |
| Constructor and Description |
|---|
ContainableElementsMapAndComparator()
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the data in this object.
|
int |
compare(net.ssehub.easy.varModel.model.ContainableModelElement element1,
net.ssehub.easy.varModel.model.ContainableModelElement element2)
Compares its two arguments for order.
|
private long |
determineIndex(net.ssehub.easy.varModel.model.ContainableModelElement element)
Determines the actual (virtual) index of the given
element. |
void |
put(org.eclipse.emf.ecore.EObject key,
net.ssehub.easy.varModel.model.Comment comment,
net.ssehub.easy.varModel.model.ContainableModelElement element)
Adds a mapping from
key to comment (optional)
and element. |
void |
setIndex(org.eclipse.emf.ecore.EObject key,
int index)
Assigns the given index taken from the sequence of key objects to the
comment or element in the assigned data.
|
private java.util.Map<java.lang.Object,ContainableElementsMapAndComparator.Data> map
EObject-ContainableElementsMapAndComparator.Data or
ContainableModelElement-ContainableElementsMapAndComparator.Data mappings.public ContainableElementsMapAndComparator()
public void put(org.eclipse.emf.ecore.EObject key,
net.ssehub.easy.varModel.model.Comment comment,
net.ssehub.easy.varModel.model.ContainableModelElement element)
key to comment (optional)
and element. (phase 1)key - the key object as parsed by xText from the input filecomment - the comment instance (may be null)element - the element instancepublic void setIndex(org.eclipse.emf.ecore.EObject key,
int index)
key is not accessible after execution of this method.
(phase 2)key - the key objectindex - the index of key in its containing data structurepublic int compare(net.ssehub.easy.varModel.model.ContainableModelElement element1,
net.ssehub.easy.varModel.model.ContainableModelElement element2)
compare in interface java.util.Comparator<net.ssehub.easy.varModel.model.ContainableModelElement>element1 - the first element to be compared.element2 - the second element to be compared.private long determineIndex(net.ssehub.easy.varModel.model.ContainableModelElement element)
element.element - the elementpublic void clear()
Copyright © 2009 - 2018 SSE. All Rights Reserved.