All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nasdanika.models.rules.impl.ViolationImpl Maven / Gradle / Ivy

There is a newer version: 2024.8.0
Show newest version
/**
 */
package org.nasdanika.models.rules.impl;

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.InternalEList;
import org.nasdanika.models.rules.Action;
import org.nasdanika.models.rules.RulesPackage;
import org.nasdanika.models.rules.Violation;
import org.nasdanika.models.rules.Waiver;

/**
 * 
 * An implementation of the model object 'Violation'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.nasdanika.models.rules.impl.ViolationImpl#getWaivers Waivers}
  • *
  • {@link org.nasdanika.models.rules.impl.ViolationImpl#getActions Actions}
  • *
* * @generated */ public class ViolationImpl extends InspectionResultImpl implements Violation { /** * * * @generated */ protected ViolationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RulesPackage.Literals.VIOLATION; } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public EList getWaivers() { return (EList)eDynamicGet(RulesPackage.VIOLATION__WAIVERS, RulesPackage.Literals.VIOLATION__WAIVERS, true, true); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public EList getActions() { return (EList)eDynamicGet(RulesPackage.VIOLATION__ACTIONS, RulesPackage.Literals.VIOLATION__ACTIONS, true, true); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: return ((InternalEList)(InternalEList)getWaivers()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: return ((InternalEList)getWaivers()).basicRemove(otherEnd, msgs); case RulesPackage.VIOLATION__ACTIONS: return ((InternalEList)getActions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: return getWaivers(); case RulesPackage.VIOLATION__ACTIONS: return getActions(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: getWaivers().clear(); getWaivers().addAll((Collection)newValue); return; case RulesPackage.VIOLATION__ACTIONS: getActions().clear(); getActions().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: getWaivers().clear(); return; case RulesPackage.VIOLATION__ACTIONS: getActions().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RulesPackage.VIOLATION__WAIVERS: return !getWaivers().isEmpty(); case RulesPackage.VIOLATION__ACTIONS: return !getActions().isEmpty(); } return super.eIsSet(featureID); } } //ViolationImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy