public boolean containsKey(Object key) { return eMap.containsKey(key); }
int index = 1; String newPrefix; while (prefixesToURIs.containsKey(newPrefix = prefix + "_" + index)) if (prefixesToURIs.containsKey(prefix + "_" + index))
int index = 1; String newPrefix; while (prefixesToURIs.containsKey(newPrefix = prefix + "_" + index)) if (prefixesToURIs.containsKey(prefix + "_" + index))
boolean isFeatureMapEntry(EStructuralFeature feature) { EAnnotation annotation = feature.getEAnnotation(ExtendedMetaData.ANNOTATION_URI); return annotation != null && annotation.getDetails().containsKey("group"); }
boolean isFeatureMapEntry(EStructuralFeature feature) { EAnnotation annotation = feature.getEAnnotation(ExtendedMetaData.ANNOTATION_URI); return annotation != null && annotation.getDetails().containsKey("group"); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Determines whether this element has the specified keyword. * @param element The receiving '<em><b>Element</b></em>' model object. * @param keyword The keyword in question. * <!-- end-model-doc --> * @generated NOT */ public static boolean hasKeyword(Element element, String keyword) { EAnnotation eAnnotation = element .getEAnnotation(UML2_UML_PACKAGE_2_0_NS_URI); return eAnnotation != null && eAnnotation.getDetails().containsKey(keyword); }
else if (GEN_MODEL_PACKAGE_NS_URI.equals(source) && eAnnotation.getDetails().containsKey("documentation"))
else if (GEN_MODEL_PACKAGE_NS_URI.equals(source) && eAnnotation.getDetails().containsKey("documentation"))
if (prefixesToURIs.containsKey(nsPrefix)) while (prefixesToURIs.containsKey(nsPrefix + "_" + index))
protected static String getValue(ENamedElement element, String annotation, String property) { EAnnotation ann = element.getEAnnotation(annotation); if (ann != null && ann.getDetails().containsKey(property)) { return ann.getDetails().get(property); } return null; }
if (prefixesToURIs.containsKey(nsPrefix)) while (prefixesToURIs.containsKey(nsPrefix + "_" + index))
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Adds the specified keyword to this element. * @param element The receiving '<em><b>Element</b></em>' model object. * @param keyword The keyword to add. * <!-- end-model-doc --> * @generated NOT */ public static boolean addKeyword(Element element, String keyword) { EMap<String, String> details = getEAnnotation(element, UML2_UML_PACKAGE_2_0_NS_URI, true).getDetails(); if (!details.containsKey(keyword)) { details.put(keyword, null); return true; } return false; }
protected static String getValue(ENamedElement element, String annotation, String property) { EAnnotation ann = element.getEAnnotation(annotation); if (ann != null && ann.getDetails().containsKey(property)) { return ann.getDetails().get(property); } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Removes the specified keyword from this element. * @param element The receiving '<em><b>Element</b></em>' model object. * @param keyword The keyword to remove. * <!-- end-model-doc --> * @generated NOT */ public static boolean removeKeyword(Element element, String keyword) { EAnnotation eAnnotation = element .getEAnnotation(UML2_UML_PACKAGE_2_0_NS_URI); if (eAnnotation != null) { EMap<String, String> details = eAnnotation.getDetails(); if (details.containsKey(keyword)) { details.removeKey(keyword); return true; } } return false; }
if (eref.isTransient()) { EAnnotation annotation = eref.getEAnnotation("http:///org/eclipse/emf/ecore/util/ExtendedMetaData"); if (annotation == null || !annotation.getDetails().containsKey("group")) { continue;
/** * Sorts all functionblock properties according to their functionblock model */ public static EMap<FunctionblockModel, EList<FunctionblockProperty>> sortByPropertyType(final EList<FunctionblockProperty> properties) { EMap<FunctionblockModel, EList<FunctionblockProperty>> map = new BasicEMap<FunctionblockModel, EList<FunctionblockProperty>>(); for (final FunctionblockProperty property : properties) { FunctionblockModel _type = property.getType(); boolean _containsKey = map.containsKey(_type); if (_containsKey) { FunctionblockModel _type_1 = property.getType(); EList<FunctionblockProperty> eList = map.get(_type_1); eList.add(property); FunctionblockModel _type_2 = property.getType(); map.put(_type_2, eList); } else { EList<FunctionblockProperty> eList_1 = new BasicEList<FunctionblockProperty>(); eList_1.add(property); FunctionblockModel _type_3 = property.getType(); map.put(_type_3, eList_1); } } return map; } }
@ParameterizedTest @ArgumentsSource(ContextProvider.All.class) void testPutMapStringString(Context context) throws IOException { try (PersistentResource resource = createPersistentResource(context)) { resource.getContents().add(EFACTORY.createETypes()); ETypes eTypes = (ETypes) resource.getContents().get(0); EMap<String, String> map = eTypes.getStringValues(); map.put(KEY1, VALUE1); map.put(KEY2, VALUE2); assertThat(map.containsKey(KEY1)).isTrue(); assertThat(map.containsKey(KEY2)).isTrue(); assertThat(map.get(KEY1)).isEqualTo(VALUE1); assertThat(map.get(KEY2)).isEqualTo(VALUE2); } }
protected void addExecution(final DeployedOperation source, final DeployedOperation target) { final ComposedKey<DeployedOperation, DeployedOperation> key = ComposedKey.of(source, target); if (!this.executionModel.getAggregatedInvocations().containsKey(key)) { final AggregatedInvocation invocation = this.factory.createAggregatedInvocation(); invocation.setSource(source); invocation.setTarget(target); this.executionModel.getAggregatedInvocations().put(key, invocation); } }
/** * Sorts all functionblock properties according to their functionblock model */ public static EMap<FunctionblockModel, EList<FunctionblockProperty>> sortByPropertyType(final EList<FunctionblockProperty> properties) { EMap<FunctionblockModel, EList<FunctionblockProperty>> map = new BasicEMap<FunctionblockModel, EList<FunctionblockProperty>>(); for (final FunctionblockProperty property : properties) { FunctionblockModel _type = property.getType(); boolean _containsKey = map.containsKey(_type); if (_containsKey) { FunctionblockModel _type_1 = property.getType(); EList<FunctionblockProperty> eList = map.get(_type_1); eList.add(property); FunctionblockModel _type_2 = property.getType(); map.put(_type_2, eList); } else { EList<FunctionblockProperty> eList_1 = new BasicEList<FunctionblockProperty>(); eList_1.add(property); FunctionblockModel _type_3 = property.getType(); map.put(_type_3, eList_1); } } return map; } }
map.put(k2, v2); assertThat(map.containsKey(k1)).isTrue(); assertThat(map.containsKey(k2)).isTrue();