/**
*/
package org.eclipse.viatra.solver.language.solverLanguage.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.viatra.solver.language.solverLanguage.AggregationOperator;
import org.eclipse.viatra.solver.language.solverLanguage.Datatype;
import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
/**
*
* An implementation of the model object 'Aggregation Operator'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationOperatorImpl#getArgumentType Argument Type}
* - {@link org.eclipse.viatra.solver.language.solverLanguage.impl.AggregationOperatorImpl#getResultType Result Type}
*
*
* @generated
*/
public class AggregationOperatorImpl extends SymbolImpl implements AggregationOperator {
/**
* The cached value of the '{@link #getArgumentType() Argument Type}' reference.
*
*
* @see #getArgumentType()
* @generated
* @ordered
*/
protected Datatype argumentType;
/**
* The cached value of the '{@link #getResultType() Result Type}' reference.
*
*
* @see #getResultType()
* @generated
* @ordered
*/
protected Datatype resultType;
/**
*
*
* @generated
*/
protected AggregationOperatorImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return SolverLanguagePackage.Literals.AGGREGATION_OPERATOR;
}
/**
*
*
* @generated
*/
public Datatype getArgumentType() {
if (argumentType != null && argumentType.eIsProxy()) {
InternalEObject oldArgumentType = (InternalEObject) argumentType;
argumentType = (Datatype) eResolveProxy(oldArgumentType);
if (argumentType != oldArgumentType) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE, oldArgumentType, argumentType));
}
}
return argumentType;
}
/**
*
*
* @generated
*/
public Datatype basicGetArgumentType() {
return argumentType;
}
/**
*
*
* @generated
*/
public void setArgumentType(Datatype newArgumentType) {
Datatype oldArgumentType = argumentType;
argumentType = newArgumentType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE, oldArgumentType, argumentType));
}
/**
*
*
* @generated
*/
public Datatype getResultType() {
if (resultType != null && resultType.eIsProxy()) {
InternalEObject oldResultType = (InternalEObject) resultType;
resultType = (Datatype) eResolveProxy(oldResultType);
if (resultType != oldResultType) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE,
SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE, oldResultType, resultType));
}
}
return resultType;
}
/**
*
*
* @generated
*/
public Datatype basicGetResultType() {
return resultType;
}
/**
*
*
* @generated
*/
public void setResultType(Datatype newResultType) {
Datatype oldResultType = resultType;
resultType = newResultType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE, oldResultType, resultType));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE:
if (resolve)
return getArgumentType();
return basicGetArgumentType();
case SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE:
if (resolve)
return getResultType();
return basicGetResultType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE:
setArgumentType((Datatype) newValue);
return;
case SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE:
setResultType((Datatype) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE:
setArgumentType((Datatype) null);
return;
case SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE:
setResultType((Datatype) null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SolverLanguagePackage.AGGREGATION_OPERATOR__ARGUMENT_TYPE:
return argumentType != null;
case SolverLanguagePackage.AGGREGATION_OPERATOR__RESULT_TYPE:
return resultType != null;
}
return super.eIsSet(featureID);
}
} //AggregationOperatorImpl