/** * Copyright (c) 2010, 2012 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Obeo - initial API and implementation */ package org.eclipse.mylyn.docs.intent.core.compiler.impl; import org.eclipse.emf.common.util.BasicEMap; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EMap; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.internal.cdo.CDOObjectImpl; import org.eclipse.mylyn.docs.intent.core.compiler.CompilerPackage; import org.eclipse.mylyn.docs.intent.core.document.UnitInstruction; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Created Element To Instruction Map Entry</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.mylyn.docs.intent.core.compiler.impl.CreatedElementToInstructionMapEntryImpl#getTypedKey <em>Key</em>}</li> * <li>{@link org.eclipse.mylyn.docs.intent.core.compiler.impl.CreatedElementToInstructionMapEntryImpl#getTypedValue <em>Value</em>}</li> * </ul> * </p> * * @generated */ public class CreatedElementToInstructionMapEntryImpl extends CDOObjectImpl implements BasicEMap.Entry<EObject, EList<UnitInstruction>> { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected CreatedElementToInstructionMapEntryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return CompilerPackage.Literals.CREATED_ELEMENT_TO_INSTRUCTION_MAP_ENTRY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected int eStaticFeatureCount() { return 0; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EObject getTypedKey() { return (EObject)eGet(CompilerPackage.Literals.CREATED_ELEMENT_TO_INSTRUCTION_MAP_ENTRY__KEY, true); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTypedKey(EObject newKey) { eSet(CompilerPackage.Literals.CREATED_ELEMENT_TO_INSTRUCTION_MAP_ENTRY__KEY, newKey); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") public EList<UnitInstruction> getTypedValue() { return (EList<UnitInstruction>)eGet( CompilerPackage.Literals.CREATED_ELEMENT_TO_INSTRUCTION_MAP_ENTRY__VALUE, true); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected int hash = -1; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getHash() { if (hash == -1) { Object theKey = getKey(); hash = (theKey == null ? 0 : theKey.hashCode()); } return hash; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setHash(int hash) { this.hash = hash; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EObject getKey() { return getTypedKey(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setKey(EObject key) { setTypedKey(key); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<UnitInstruction> getValue() { return getTypedValue(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<UnitInstruction> setValue(EList<UnitInstruction> value) { EList<UnitInstruction> oldValue = getValue(); getTypedValue().clear(); getTypedValue().addAll(value); return oldValue; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") public EMap<EObject, EList<UnitInstruction>> getEMap() { EObject container = eContainer(); return container == null ? null : (EMap<EObject, EList<UnitInstruction>>)container .eGet(eContainmentFeature()); } } //CreatedElementToInstructionMapEntryImpl