/**
*/
package hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.impl;
import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage;
import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.UpperMultiplicityAssertion;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Upper Multiplicity Assertion'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.impl.UpperMultiplicityAssertionImpl#getUpper Upper}
*
*
* @generated
*/
public class UpperMultiplicityAssertionImpl extends MultiplicityAssertionImpl implements UpperMultiplicityAssertion {
/**
* The default value of the '{@link #getUpper() Upper}' attribute.
*
*
* @see #getUpper()
* @generated
* @ordered
*/
protected static final int UPPER_EDEFAULT = 0;
/**
* The cached value of the '{@link #getUpper() Upper}' attribute.
*
*
* @see #getUpper()
* @generated
* @ordered
*/
protected int upper = UPPER_EDEFAULT;
/**
*
*
* @generated
*/
protected UpperMultiplicityAssertionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Ecore2logicannotationsPackage.Literals.UPPER_MULTIPLICITY_ASSERTION;
}
/**
*
*
* @generated
*/
public int getUpper() {
return upper;
}
/**
*
*
* @generated
*/
public void setUpper(int newUpper) {
int oldUpper = upper;
upper = newUpper;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ecore2logicannotationsPackage.UPPER_MULTIPLICITY_ASSERTION__UPPER, oldUpper, upper));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ecore2logicannotationsPackage.UPPER_MULTIPLICITY_ASSERTION__UPPER:
return getUpper();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ecore2logicannotationsPackage.UPPER_MULTIPLICITY_ASSERTION__UPPER:
setUpper((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Ecore2logicannotationsPackage.UPPER_MULTIPLICITY_ASSERTION__UPPER:
setUpper(UPPER_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ecore2logicannotationsPackage.UPPER_MULTIPLICITY_ASSERTION__UPPER:
return upper != UPPER_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (upper: ");
result.append(upper);
result.append(')');
return result.toString();
}
} //UpperMultiplicityAssertionImpl