private Map<Transition, XEventClass> getmap(Collection<Pair<Transition, XEventClass>> map) { Map<Transition, XEventClass> maps = new HashMap<Transition, XEventClass>(); for (Pair<Transition, XEventClass> coppia : map) { XEventClass sec = coppia.getSecond(); if (!sec.toString().equals("DUMMY")) { maps.put(coppia.getFirst(), coppia.getSecond()); } } return maps; }
private Map<Transition, XEventClass> getMapping(XEventClasses classes, Petrinet net) { Map<Transition, XEventClass> map = new HashMap<Transition, XEventClass>(); for (Transition transition : net.getTransitions()) { boolean visible = false; for (XEventClass eventClass : classes.getClasses()) { if (eventClass.getId().equals(transition.getAttributeMap().get(AttributeMap.LABEL))) { map.put(transition, eventClass); visible = true; } } if (!visible) { transition.setInvisible(true); } } return map; }