org.nasdanika.html.model.bootstrap.impl.AppearanceEntryImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.html.model.bootstrap.impl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.BasicEMap;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.nasdanika.html.model.bootstrap.Appearance;
import org.nasdanika.html.model.bootstrap.BootstrapPackage;
/**
*
* An implementation of the model object 'Appearance Entry'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.html.model.bootstrap.impl.AppearanceEntryImpl#getTypedKey Key}
* - {@link org.nasdanika.html.model.bootstrap.impl.AppearanceEntryImpl#getTypedValue Value}
*
*
* @generated
*/
public class AppearanceEntryImpl extends MinimalEObjectImpl.Container implements BasicEMap.Entry {
/**
* The default value of the '{@link #getTypedKey() Key}' attribute.
*
*
* @see #getTypedKey()
* @generated
* @ordered
*/
protected static final String KEY_EDEFAULT = null;
/**
*
*
* @generated
*/
protected AppearanceEntryImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BootstrapPackage.Literals.APPEARANCE_ENTRY;
}
/**
*
*
* @generated
*/
@Override
protected int eStaticFeatureCount() {
return 0;
}
/**
*
*
* @generated
*/
public String getTypedKey() {
return (String)eDynamicGet(BootstrapPackage.APPEARANCE_ENTRY__KEY, BootstrapPackage.Literals.APPEARANCE_ENTRY__KEY, true, true);
}
/**
*
*
* @generated
*/
public void setTypedKey(String newKey) {
eDynamicSet(BootstrapPackage.APPEARANCE_ENTRY__KEY, BootstrapPackage.Literals.APPEARANCE_ENTRY__KEY, newKey);
}
/**
*
*
* @generated
*/
public Appearance getTypedValue() {
return (Appearance)eDynamicGet(BootstrapPackage.APPEARANCE_ENTRY__VALUE, BootstrapPackage.Literals.APPEARANCE_ENTRY__VALUE, true, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetTypedValue(Appearance newValue, NotificationChain msgs) {
msgs = eDynamicInverseAdd((InternalEObject)newValue, BootstrapPackage.APPEARANCE_ENTRY__VALUE, msgs);
return msgs;
}
/**
*
*
* @generated
*/
public void setTypedValue(Appearance newValue) {
eDynamicSet(BootstrapPackage.APPEARANCE_ENTRY__VALUE, BootstrapPackage.Literals.APPEARANCE_ENTRY__VALUE, newValue);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BootstrapPackage.APPEARANCE_ENTRY__VALUE:
return basicSetTypedValue(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BootstrapPackage.APPEARANCE_ENTRY__KEY:
return getTypedKey();
case BootstrapPackage.APPEARANCE_ENTRY__VALUE:
return getTypedValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BootstrapPackage.APPEARANCE_ENTRY__KEY:
setTypedKey((String)newValue);
return;
case BootstrapPackage.APPEARANCE_ENTRY__VALUE:
setTypedValue((Appearance)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BootstrapPackage.APPEARANCE_ENTRY__KEY:
setTypedKey(KEY_EDEFAULT);
return;
case BootstrapPackage.APPEARANCE_ENTRY__VALUE:
setTypedValue((Appearance)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BootstrapPackage.APPEARANCE_ENTRY__KEY:
return KEY_EDEFAULT == null ? getTypedKey() != null : !KEY_EDEFAULT.equals(getTypedKey());
case BootstrapPackage.APPEARANCE_ENTRY__VALUE:
return getTypedValue() != null;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
protected int hash = -1;
/**
*
*
* @generated
*/
@Override
public int getHash() {
if (hash == -1) {
Object theKey = getKey();
hash = (theKey == null ? 0 : theKey.hashCode());
}
return hash;
}
/**
*
*
* @generated
*/
@Override
public void setHash(int hash) {
this.hash = hash;
}
/**
*
*
* @generated
*/
@Override
public String getKey() {
return getTypedKey();
}
/**
*
*
* @generated
*/
@Override
public void setKey(String key) {
setTypedKey(key);
}
/**
*
*
* @generated
*/
@Override
public Appearance getValue() {
return getTypedValue();
}
/**
*
*
* @generated
*/
@Override
public Appearance setValue(Appearance value) {
Appearance oldValue = getValue();
setTypedValue(value);
return oldValue;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
public EMap getEMap() {
EObject container = eContainer();
return container == null ? null : (EMap)container.eGet(eContainmentFeature());
}
} //AppearanceEntryImpl
© 2015 - 2024 Weber Informatics LLC | Privacy Policy