/**
*/
package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl;
import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.DefinedElementImpl;
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage;
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement;
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 'Primitive Element'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PrimitiveElementImpl#isValueSet Value Set}
*
*
* @generated
*/
public abstract class PrimitiveElementImpl extends DefinedElementImpl implements PrimitiveElement {
/**
* The default value of the '{@link #isValueSet() Value Set}' attribute.
*
*
* @see #isValueSet()
* @generated
* @ordered
*/
protected static final boolean VALUE_SET_EDEFAULT = false;
/**
* The cached value of the '{@link #isValueSet() Value Set}' attribute.
*
*
* @see #isValueSet()
* @generated
* @ordered
*/
protected boolean valueSet = VALUE_SET_EDEFAULT;
/**
*
*
* @generated
*/
protected PrimitiveElementImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return PartialinterpretationPackage.Literals.PRIMITIVE_ELEMENT;
}
/**
*
*
* @generated
*/
public boolean isValueSet() {
return valueSet;
}
/**
*
*
* @generated
*/
public void setValueSet(boolean newValueSet) {
boolean oldValueSet = valueSet;
valueSet = newValueSet;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PRIMITIVE_ELEMENT__VALUE_SET, oldValueSet, valueSet));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case PartialinterpretationPackage.PRIMITIVE_ELEMENT__VALUE_SET:
return isValueSet();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case PartialinterpretationPackage.PRIMITIVE_ELEMENT__VALUE_SET:
setValueSet((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case PartialinterpretationPackage.PRIMITIVE_ELEMENT__VALUE_SET:
setValueSet(VALUE_SET_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case PartialinterpretationPackage.PRIMITIVE_ELEMENT__VALUE_SET:
return valueSet != VALUE_SET_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (valueSet: ");
result.append(valueSet);
result.append(')');
return result.toString();
}
} //PrimitiveElementImpl