/**
*/
package TaxationWithRoot.impl;
import TaxationWithRoot.Category_of_Permanent_Expense;
import TaxationWithRoot.Permanent_Expense;
import TaxationWithRoot.TaxationPackage;
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 'Permanent Expense'.
*
*
* The following features are implemented:
*
*
* - {@link TaxationWithRoot.impl.Permanent_ExpenseImpl#getCategory Category}
*
*
* @generated
*/
public class Permanent_ExpenseImpl extends Special_Expense_DSImpl implements Permanent_Expense {
/**
* The default value of the '{@link #getCategory() Category}' attribute.
*
*
* @see #getCategory()
* @generated
* @ordered
*/
protected static final Category_of_Permanent_Expense CATEGORY_EDEFAULT = Category_of_Permanent_Expense.MISCELLANEOUS_DEBT;
/**
* The cached value of the '{@link #getCategory() Category}' attribute.
*
*
* @see #getCategory()
* @generated
* @ordered
*/
protected Category_of_Permanent_Expense category = CATEGORY_EDEFAULT;
/**
*
*
* @generated
*/
protected Permanent_ExpenseImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return TaxationPackage.Literals.PERMANENT_EXPENSE;
}
/**
*
*
* @generated
*/
@Override
public Category_of_Permanent_Expense getCategory() {
return category;
}
/**
*
*
* @generated
*/
@Override
public void setCategory(Category_of_Permanent_Expense newCategory) {
Category_of_Permanent_Expense oldCategory = category;
category = newCategory == null ? CATEGORY_EDEFAULT : newCategory;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.PERMANENT_EXPENSE__CATEGORY, oldCategory, category));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case TaxationPackage.PERMANENT_EXPENSE__CATEGORY:
return getCategory();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TaxationPackage.PERMANENT_EXPENSE__CATEGORY:
setCategory((Category_of_Permanent_Expense)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case TaxationPackage.PERMANENT_EXPENSE__CATEGORY:
setCategory(CATEGORY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case TaxationPackage.PERMANENT_EXPENSE__CATEGORY:
return category != CATEGORY_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (category: ");
result.append(category);
result.append(')');
return result.toString();
}
} //Permanent_ExpenseImpl