/**
*/
package net.certware.argument.sfp.semiFormalProof.impl;
import java.util.Collection;
import net.certware.argument.sfp.semiFormalProof.Justification;
import net.certware.argument.sfp.semiFormalProof.Justifications;
import net.certware.argument.sfp.semiFormalProof.SemiFormalProofPackage;
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.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Justifications</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link net.certware.argument.sfp.semiFormalProof.impl.JustificationsImpl#getJustifications <em>Justifications</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class JustificationsImpl extends MinimalEObjectImpl.Container implements Justifications
{
/**
* The cached value of the '{@link #getJustifications() <em>Justifications</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getJustifications()
* @generated
* @ordered
*/
protected EList<Justification> justifications;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected JustificationsImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return SemiFormalProofPackage.Literals.JUSTIFICATIONS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Justification> getJustifications()
{
if (justifications == null)
{
justifications = new EObjectContainmentEList<Justification>(Justification.class, this, SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS);
}
return justifications;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS:
return ((InternalEList<?>)getJustifications()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS:
return getJustifications();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS:
getJustifications().clear();
getJustifications().addAll((Collection<? extends Justification>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS:
getJustifications().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case SemiFormalProofPackage.JUSTIFICATIONS__JUSTIFICATIONS:
return justifications != null && !justifications.isEmpty();
}
return super.eIsSet(featureID);
}
} //JustificationsImpl