/**
* generated by Xtext 2.10.0
*/
package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.IntervallNumber;
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 'Intervall Number'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.IntervallNumberImpl#getMin Min}
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.IntervallNumberImpl#getMaxNumber Max Number}
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.IntervallNumberImpl#isMaxUnlimited Max Unlimited}
*
*
* @generated
*/
public class IntervallNumberImpl extends NumberSpecificationImpl implements IntervallNumber
{
/**
* The default value of the '{@link #getMin() Min}' attribute.
*
*
* @see #getMin()
* @generated
* @ordered
*/
protected static final int MIN_EDEFAULT = 0;
/**
* The cached value of the '{@link #getMin() Min}' attribute.
*
*
* @see #getMin()
* @generated
* @ordered
*/
protected int min = MIN_EDEFAULT;
/**
* The default value of the '{@link #getMaxNumber() Max Number}' attribute.
*
*
* @see #getMaxNumber()
* @generated
* @ordered
*/
protected static final int MAX_NUMBER_EDEFAULT = 0;
/**
* The cached value of the '{@link #getMaxNumber() Max Number}' attribute.
*
*
* @see #getMaxNumber()
* @generated
* @ordered
*/
protected int maxNumber = MAX_NUMBER_EDEFAULT;
/**
* The default value of the '{@link #isMaxUnlimited() Max Unlimited}' attribute.
*
*
* @see #isMaxUnlimited()
* @generated
* @ordered
*/
protected static final boolean MAX_UNLIMITED_EDEFAULT = false;
/**
* The cached value of the '{@link #isMaxUnlimited() Max Unlimited}' attribute.
*
*
* @see #isMaxUnlimited()
* @generated
* @ordered
*/
protected boolean maxUnlimited = MAX_UNLIMITED_EDEFAULT;
/**
*
*
* @generated
*/
protected IntervallNumberImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ApplicationConfigurationPackage.Literals.INTERVALL_NUMBER;
}
/**
*
*
* @generated
*/
public int getMin()
{
return min;
}
/**
*
*
* @generated
*/
public void setMin(int newMin)
{
int oldMin = min;
min = newMin;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.INTERVALL_NUMBER__MIN, oldMin, min));
}
/**
*
*
* @generated
*/
public int getMaxNumber()
{
return maxNumber;
}
/**
*
*
* @generated
*/
public void setMaxNumber(int newMaxNumber)
{
int oldMaxNumber = maxNumber;
maxNumber = newMaxNumber;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_NUMBER, oldMaxNumber, maxNumber));
}
/**
*
*
* @generated
*/
public boolean isMaxUnlimited()
{
return maxUnlimited;
}
/**
*
*
* @generated
*/
public void setMaxUnlimited(boolean newMaxUnlimited)
{
boolean oldMaxUnlimited = maxUnlimited;
maxUnlimited = newMaxUnlimited;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_UNLIMITED, oldMaxUnlimited, maxUnlimited));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MIN:
return getMin();
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_NUMBER:
return getMaxNumber();
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_UNLIMITED:
return isMaxUnlimited();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MIN:
setMin((Integer)newValue);
return;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_NUMBER:
setMaxNumber((Integer)newValue);
return;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_UNLIMITED:
setMaxUnlimited((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MIN:
setMin(MIN_EDEFAULT);
return;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_NUMBER:
setMaxNumber(MAX_NUMBER_EDEFAULT);
return;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_UNLIMITED:
setMaxUnlimited(MAX_UNLIMITED_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MIN:
return min != MIN_EDEFAULT;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_NUMBER:
return maxNumber != MAX_NUMBER_EDEFAULT;
case ApplicationConfigurationPackage.INTERVALL_NUMBER__MAX_UNLIMITED:
return maxUnlimited != MAX_UNLIMITED_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (min: ");
result.append(min);
result.append(", maxNumber: ");
result.append(maxNumber);
result.append(", maxUnlimited: ");
result.append(maxUnlimited);
result.append(')');
return result.toString();
}
} //IntervallNumberImpl