Search in sources :

Example 1 with UniqueEList

use of org.eclipse.emf.common.util.UniqueEList in project InformationSystem by ObeoNetwork.

the class EntityFilterImpl method getReferenceReferences.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Reference> getReferenceReferences() {
    BasicEList<Reference> result = new UniqueEList<Reference>() {

        private static final long serialVersionUID = 5391913769894408421L;

        protected Object[] newData(int capacity) {
            return new Reference[capacity];
        }

        protected boolean useEquals() {
            return false;
        }
    };
    for (Property property : getOwnedPropertyReferences()) {
        if (property instanceof Reference) {
            result.add((Reference) property);
        }
    }
    result.shrink();
    EList<Reference> unmodifiableResult = new EcoreEList.UnmodifiableEList.FastCompare<Reference>(this, ExtensionUtilitiesPackage.eINSTANCE.getEntityFilter_ReferenceReferences(), result.size(), result.data());
    return unmodifiableResult;
}
Also used : UniqueEList(org.eclipse.emf.common.util.UniqueEList) Reference(org.obeonetwork.dsl.environment.Reference) EcoreEList(org.eclipse.emf.ecore.util.EcoreEList) Property(org.obeonetwork.dsl.environment.Property)

Example 2 with UniqueEList

use of org.eclipse.emf.common.util.UniqueEList in project InformationSystem by ObeoNetwork.

the class EntityFilterImpl method getAttributeReferences.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Attribute> getAttributeReferences() {
    BasicEList<Attribute> result = new UniqueEList<Attribute>() {

        private static final long serialVersionUID = 971586213550724954L;

        protected Object[] newData(int capacity) {
            return new Attribute[capacity];
        }

        protected boolean useEquals() {
            return false;
        }
    };
    for (Property property : getOwnedPropertyReferences()) {
        if (property instanceof Attribute) {
            result.add((Attribute) property);
        }
    }
    result.shrink();
    EList<Attribute> unmodifiableResult = new EcoreEList.UnmodifiableEList.FastCompare<Attribute>(this, ExtensionUtilitiesPackage.Literals.ENTITY_FILTER__ATTRIBUTE_REFERENCES, result.size(), result.data());
    return unmodifiableResult;
}
Also used : Attribute(org.obeonetwork.dsl.environment.Attribute) UniqueEList(org.eclipse.emf.common.util.UniqueEList) EcoreEList(org.eclipse.emf.ecore.util.EcoreEList) Property(org.obeonetwork.dsl.environment.Property)

Aggregations

UniqueEList (org.eclipse.emf.common.util.UniqueEList)2 EcoreEList (org.eclipse.emf.ecore.util.EcoreEList)2 Property (org.obeonetwork.dsl.environment.Property)2 Attribute (org.obeonetwork.dsl.environment.Attribute)1 Reference (org.obeonetwork.dsl.environment.Reference)1