/**
* 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.PatternEntry;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternSpecification;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Pattern Specification'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.PatternSpecificationImpl#getEntries Entries}
*
*
* @generated
*/
public class PatternSpecificationImpl extends GraphPatternImpl implements PatternSpecification
{
/**
* The cached value of the '{@link #getEntries() Entries}' containment reference list.
*
*
* @see #getEntries()
* @generated
* @ordered
*/
protected EList entries;
/**
*
*
* @generated
*/
protected PatternSpecificationImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ApplicationConfigurationPackage.Literals.PATTERN_SPECIFICATION;
}
/**
*
*
* @generated
*/
public EList getEntries()
{
if (entries == null)
{
entries = new EObjectContainmentEList(PatternEntry.class, this, ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES);
}
return entries;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES:
return ((InternalEList>)getEntries()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES:
return getEntries();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES:
getEntries().clear();
getEntries().addAll((Collection extends PatternEntry>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES:
getEntries().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_SPECIFICATION__ENTRIES:
return entries != null && !entries.isEmpty();
}
return super.eIsSet(featureID);
}
} //PatternSpecificationImpl