/** * Gets the qualifiers of an association end. * By default, it is assumed that properties never have qualifiers * because Ecore does not directly support this concept. * * @param property a property of the model class * @return an empty list, by default */ public List<EStructuralFeature> getQualifiers(EStructuralFeature property) { return ECollections.emptyEList(); }
/** * Returns a mutable list containing the elements of the given iterator. * @return a mutable list containing the same elements as the given iterator. * @since 2.9 */ public static <T> EList<T> toEList(Iterator<? extends T> iterator) { return ECollections.newBasicEList(iterator); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The inherit operation is overridden to exclude redefined properties. * The query inherit() defines how to inherit a set of elements. Here the operation is defined to inherit them all. It is intended to be redefined in circumstances where inheritance is affected by redefinition. * result = inhs * @param classifier The receiving '<em><b>Classifier</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EList<NamedElement> inherit(Classifier classifier, EList<NamedElement> inhs) { return ECollections.unmodifiableEList(inhs); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<InputSpecification> getKnownInputs () { if ( this.knownInputs == null ) { final BasicEList<InputSpecification> inputs = ECollections.newBasicEList (); inputs.add ( Components.createInput ( "input" ) ); this.knownInputs = ECollections.unmodifiableEList ( inputs ); } return this.knownInputs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<ReferenceEmbed> getEmbedHierarchy() { EObject container = eContainer(); if (container instanceof ReferenceRealization) { // use containers of the parent ReferenceRealization container = container.eContainer(); } if (container instanceof ReferenceEmbed) { ReferenceEmbed parentEmbed = (ReferenceEmbed)container; List<ReferenceEmbed> hierarchy = Lists.newArrayList(parentEmbed.getEmbedHierarchy()); hierarchy.add(parentEmbed); return ECollections.unmodifiableEList(hierarchy); } return ECollections.emptyEList(); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<MasterServer> getMasterOn () { if ( getSourceMaster () != null && getSourceMaster ().getMaster () != null ) { return ECollections.singletonEList ( getSourceMaster ().getMaster () ); } else { return ECollections.emptyEList (); } }
protected void process(boolean reverse, boolean apply) { Resource resource = getResource(); if (resource != null && listChanges != null) { EList<Object> value = getValue(); if (apply) { @SuppressWarnings({"unchecked", "rawtypes"}) EList<Object> result = (EList)resource.getContents(); ECollections.setEList(result, value); } if (reverse) { ECollections.reverse(getListChanges()); setValue(newValue); } } }
private void sortPrimitiveList(EList<IdEObject> list) { ECollections.sort(list, new Comparator<IdEObject>() { @Override public int compare(IdEObject o1, IdEObject o2) { return comparePrimitives(o1, o2); } }); }
/** * Sets the <code>eList</code>'s contents and order to be exactly that of the <code>prototype</code> list. * This implementation minimizes the number of notifications the operation will produce. * Objects already in the list will be moved, missing objects will be added, and extra objects will be removed. * If <code>eList</code>'s contents and order are already exactly that of the <code>prototype</code> list, * no change will be made. * @param eList the list to set. * @param prototypeList the list representing the desired content and order. * @deprecated replaced by {@link ECollections#setEList(EList, List)} in 2.1.0 */ @Deprecated public static <T> void setEList(EList<T> eList, List<? extends T> prototypeList) { ECollections.setEList(eList, prototypeList); }
resourceMap.put(normalizedURI, ECollections.singletonEList(resource));
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<OutputSpecification> getKnownOutputs () { if ( this.knownOutputs == null ) { final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList (); outputs.add ( Components.createOutput ( "output", null ) ); this.knownOutputs = ECollections.unmodifiableEList ( outputs ); } return this.knownOutputs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<MasterServer> getMasterOn () { if ( getSourceMaster () != null && getSourceMaster ().getMaster () != null ) { return ECollections.singletonEList ( getSourceMaster ().getMaster () ); } else { return ECollections.emptyEList (); } }
protected void process(boolean reverse, boolean apply) { Resource resource = getResource(); if (resource != null && listChanges != null) { EList<Object> value = getValue(); if (apply) { @SuppressWarnings({"unchecked", "rawtypes"}) EList<Object> result = (EList)resource.getContents(); ECollections.setEList(result, value); } if (reverse) { ECollections.reverse(getListChanges()); setValue(newValue); } } }
private void sortComplexList(final ObjectIDM objectIDM, final EClass originalQueryClass, EList<IdEObject> list, EStructuralFeature eStructuralFeature) { final EClass type = (EClass) eStructuralFeature.getEType(); ECollections.sort(list, new Comparator<IdEObject>() { @Override public int compare(IdEObject o1, IdEObject o2) { int i = 1; for (EStructuralFeature eStructuralFeature : type.getEAllStructuralFeatures()) { if (objectIDM.shouldFollowReference(originalQueryClass, type, eStructuralFeature)) { Object val1 = o1.eGet(eStructuralFeature); Object val2 = o2.eGet(eStructuralFeature); if (val1 != null && val2 != null) { if (eStructuralFeature.getEType() instanceof EClass) { if (eStructuralFeature.getEType().getEAnnotation("wrapped") != null) { int compare = comparePrimitives((IdEObject) val1, (IdEObject) val2); if (compare != 0) { return compare * i; } } } } i++; } } return 0; } }); }
/** * Sets the <code>eList</code>'s contents and order to be exactly that of the <code>prototype</code> list. * This implementation minimizes the number of notifications the operation will produce. * Objects already in the list will be moved, missing objects will be added, and extra objects will be removed. * If <code>eList</code>'s contents and order are already exactly that of the <code>prototype</code> list, * no change will be made. * @param eList the list to set. * @param prototypeList the list representing the desired content and order. * @deprecated replaced by {@link ECollections#setEList(EList, List)} in 2.1.0 */ @Deprecated public static <T> void setEList(EList<T> eList, List<? extends T> prototypeList) { ECollections.setEList(eList, prototypeList); }
resourceMap.put(normalizedURI, ECollections.singletonEList(resource));
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<String> getBundles () { return ECollections.emptyEList (); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated NOT */ @Override public EList<InputSpecification> getKnownInputs () { if ( this.knownInputs == null ) { final BasicEList<InputSpecification> inputs = ECollections.newBasicEList (); inputs.add ( Components.createInput ( "input" ) ); this.knownInputs = ECollections.unmodifiableEList ( inputs ); } return this.knownInputs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Utility returning the set of realized interfaces of a component: * result = (classifier.clientDependency-> * select(dependency|dependency.oclIsKindOf(Realization) and dependency.supplier.oclIsKindOf(Interface)))-> * collect(dependency|dependency.client) * @param component The receiving '<em><b>Component</b></em>' model object. * <!-- end-model-doc --> * @generated NOT */ public static EList<Interface> realizedInterfaces(Component component, Classifier classifier) { return ECollections.unmodifiableEList(realizedInterfaces(component, classifier, true)); }
return ECollections.newBasicEList(iterable);