19package denoptim.graph;
21import java.util.LinkedHashMap;
24import denoptim.exception.DENOPTIMException;
40public class APMapping extends LinkedHashMap<AttachmentPoint, AttachmentPoint>
73 LinkedHashMap<Integer, Integer> apMap =
new LinkedHashMap<Integer, Integer>();
83 if (ownerKey !=
null && key.getOwner() != ownerKey)
86 + key.getID() +
" is not vertex "
88 +
"converted to int-mapping.");
91 if (ownerVal !=
null && val.
getOwner() != ownerVal)
93 throw new IllegalStateException(
"Owner of AP "
94 + val.
getID() +
" is not vertex "
96 +
"converted to int-mapping.");
100 ownerKey = key.getOwner();
117 return this.keySet().containsAll(keys);
131 return this.values().containsAll(keys);
145 c.put(key, this.
get(key));
158 StringBuilder sb =
new StringBuilder();
161 sb.append(key.getID()+
"-"+
this.get(key).getID()+
" ");
163 return sb.toString();
Class representing a mapping between attachment points (APs).
LinkedHashMap< Integer, Integer > toIntMappig()
Produces an index-based version of this mapping where each index represents the attachment point as i...
APMapping()
Creates a mapping that links no pair of APs.
APMapping clone()
Shallow cloning.
static final long serialVersionUID
Version UID.
boolean containsAllValues(List< AttachmentPoint > keys)
Check if this mapping contains all the given attachment points (APs) in the 2nd positions of the AP p...
String toString()
Produces a human readable string based on the AP IDs.
boolean containsAllKeys(List< AttachmentPoint > keys)
Check if this mapping contains all the given attachment points (APs) in the 1st positions of the AP p...
An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i....
int getID()
Returns a unique integer that is used to sort list of attachment points.
A vertex is a data structure that has an identity and holds a list of AttachmentPoints.