/**
*/
package net.certware.intent.intentSpecification.impl;
import net.certware.intent.intentSpecification.IntentSpecificationPackage;
import net.certware.intent.intentSpecification.ListItemType;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>List Item Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link net.certware.intent.intentSpecification.impl.ListItemTypeImpl#getTypeName <em>Type Name</em>}</li>
* </ul>
*
* @generated
*/
public class ListItemTypeImpl extends MinimalEObjectImpl.Container implements ListItemType
{
/**
* The default value of the '{@link #getTypeName() <em>Type Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeName()
* @generated
* @ordered
*/
protected static final String TYPE_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getTypeName() <em>Type Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeName()
* @generated
* @ordered
*/
protected String typeName = TYPE_NAME_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ListItemTypeImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return IntentSpecificationPackage.Literals.LIST_ITEM_TYPE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getTypeName()
{
return typeName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTypeName(String newTypeName)
{
String oldTypeName = typeName;
typeName = newTypeName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, IntentSpecificationPackage.LIST_ITEM_TYPE__TYPE_NAME, oldTypeName, typeName));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case IntentSpecificationPackage.LIST_ITEM_TYPE__TYPE_NAME:
return getTypeName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case IntentSpecificationPackage.LIST_ITEM_TYPE__TYPE_NAME:
setTypeName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case IntentSpecificationPackage.LIST_ITEM_TYPE__TYPE_NAME:
setTypeName(TYPE_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case IntentSpecificationPackage.LIST_ITEM_TYPE__TYPE_NAME:
return TYPE_NAME_EDEFAULT == null ? typeName != null : !TYPE_NAME_EDEFAULT.equals(typeName);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (typeName: ");
result.append(typeName);
result.append(')');
return result.toString();
}
} //ListItemTypeImpl