From 945f487a08b643392a5d5918c631640b9a0e4605 Mon Sep 17 00:00:00 2001 From: 20001LastOrder Date: Tue, 3 Nov 2020 22:52:26 -0500 Subject: add realistic solver --- .../socialnetwork/impl/SocialNetworkImpl.java | 228 +++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java') diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java new file mode 100644 index 00000000..cb28b749 --- /dev/null +++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/encore_gen/socialnetwork/impl/SocialNetworkImpl.java @@ -0,0 +1,228 @@ +/** + */ +package socialnetwork.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import socialnetwork.Person; +import socialnetwork.SocialNetwork; +import socialnetwork.SocialnetworkPackage; + +/** + * + * An implementation of the model object 'Social Network'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class SocialNetworkImpl extends MinimalEObjectImpl.Container implements SocialNetwork { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = "SocialNetwork"; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getPersons() Persons}' containment reference list. + * + * + * @see #getPersons() + * @generated + * @ordered + */ + protected EList persons; + + /** + * + * + * @generated + */ + protected SocialNetworkImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SocialnetworkPackage.Literals.SOCIAL_NETWORK; + } + + /** + * + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SocialnetworkPackage.SOCIAL_NETWORK__NAME, oldName, + name)); + } + + /** + * + * + * @generated + */ + @Override + public EList getPersons() { + if (persons == null) { + persons = new EObjectContainmentEList(Person.class, this, + SocialnetworkPackage.SOCIAL_NETWORK__PERSONS); + } + return persons; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS: + return ((InternalEList) getPersons()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SocialnetworkPackage.SOCIAL_NETWORK__NAME: + return getName(); + case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS: + return getPersons(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SocialnetworkPackage.SOCIAL_NETWORK__NAME: + setName((String) newValue); + return; + case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS: + getPersons().clear(); + getPersons().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SocialnetworkPackage.SOCIAL_NETWORK__NAME: + setName(NAME_EDEFAULT); + return; + case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS: + getPersons().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SocialnetworkPackage.SOCIAL_NETWORK__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case SocialnetworkPackage.SOCIAL_NETWORK__PERSONS: + return persons != null && !persons.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //SocialNetworkImpl -- cgit v1.2.3-54-g00ecf