content: /**
   */
  package org.abapgit.adt.backend.model.abapgitexternalrepo.impl;
  
  import java.util.Collection;
  
  import org.abapgit.adt.backend.model.abapgitexternalrepo.AccessMode;
  import org.abapgit.adt.backend.model.abapgitexternalrepo.IAbapgitexternalrepoPackage;
  import org.abapgit.adt.backend.model.abapgitexternalrepo.IBranch;
  import org.abapgit.adt.backend.model.abapgitexternalrepo.IExternalRepositoryInfo;
  import org.eclipse.emf.common.notify.Notification;
  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.ENotificationImpl;
  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>External Repository Info</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * </p>
   * <ul>
   *   <li>{@link org.abapgit.adt.backend.model.abapgitexternalrepo.impl.ExternalRepositoryInfoImpl#getBranches <em>Branches</em>}</li>
   *   <li>{@link org.abapgit.adt.backend.model.abapgitexternalrepo.impl.ExternalRepositoryInfoImpl#getAccessMode <em>Access Mode</em>}</li>
   * </ul>
   *
   * @generated
   */
  public class ExternalRepositoryInfoImpl extends MinimalEObjectImpl.Container implements IExternalRepositoryInfo {
  	/**
  	 * The cached value of the '{@link #getBranches() <em>Branches</em>}' containment reference list.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getBranches()
  	 * @generated
  	 * @ordered
  	 */
  	protected EList<IBranch> branches;
  
  	/**
  	 * The default value of the '{@link #getAccessMode() <em>Access Mode</em>}' attribute.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getAccessMode()
  	 * @generated
  	 * @ordered
  	 */
  	protected static final AccessMode ACCESS_MODE_EDEFAULT = AccessMode.PUBLIC;
  
  	/**
  	 * The cached value of the '{@link #getAccessMode() <em>Access Mode</em>}' attribute.
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @see #getAccessMode()
  	 * @generated
  	 * @ordered
  	 */
  	protected AccessMode accessMode = ACCESS_MODE_EDEFAULT;
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	protected ExternalRepositoryInfoImpl() {
  		super();
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	protected EClass eStaticClass() {
  		return IAbapgitexternalrepoPackage.Literals.EXTERNAL_REPOSITORY_INFO;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public EList<IBranch> getBranches() {
  		if (branches == null) {
  			branches = new EObjectContainmentEList<IBranch>(IBranch.class, this, IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES);
  		}
  		return branches;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public AccessMode getAccessMode() {
  		return accessMode;
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public void setAccessMode(AccessMode newAccessMode) {
  		AccessMode oldAccessMode = accessMode;
  		accessMode = newAccessMode == null ? ACCESS_MODE_EDEFAULT : newAccessMode;
  		if (eNotificationRequired())
  			eNotify(new ENotificationImpl(this, Notification.SET, IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__ACCESS_MODE, oldAccessMode, accessMode));
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
  		switch (featureID) {
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES:
  				return ((InternalEList<?>)getBranches()).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 IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES:
  				return getBranches();
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__ACCESS_MODE:
  				return getAccessMode();
  		}
  		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 IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES:
  				getBranches().clear();
  				getBranches().addAll((Collection<? extends IBranch>)newValue);
  				return;
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__ACCESS_MODE:
  				setAccessMode((AccessMode)newValue);
  				return;
  		}
  		super.eSet(featureID, newValue);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public void eUnset(int featureID) {
  		switch (featureID) {
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES:
  				getBranches().clear();
  				return;
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__ACCESS_MODE:
  				setAccessMode(ACCESS_MODE_EDEFAULT);
  				return;
  		}
  		super.eUnset(featureID);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public boolean eIsSet(int featureID) {
  		switch (featureID) {
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__BRANCHES:
  				return branches != null && !branches.isEmpty();
  			case IAbapgitexternalrepoPackage.EXTERNAL_REPOSITORY_INFO__ACCESS_MODE:
  				return accessMode != ACCESS_MODE_EDEFAULT;
  		}
  		return super.eIsSet(featureID);
  	}
  
  	/**
  	 * <!-- begin-user-doc -->
  	 * <!-- end-user-doc -->
  	 * @generated
  	 */
  	@Override
  	public String toString() {
  		if (eIsProxy()) return super.toString();
  
  		StringBuilder result = new StringBuilder(super.toString());
  		result.append(" (accessMode: ");
  		result.append(accessMode);
  		result.append(')');
  		return result.toString();
  	}
  
  	@Override
  	public int hashCode() {
  		final int prime = 31;
  		int result = 1;
  		result = prime * result + ((this.accessMode == null) ? 0 : this.accessMode.hashCode());
  		result = prime * result + ((this.branches == null) ? 0 : this.branches.hashCode());
  		return result;
  	}
  
  	@Override
  	public boolean equals(Object obj) {
  		if (this == obj) {
  			return true;
  		}
  		if (obj == null) {
  			return false;
  		}
  		if (getClass() != obj.getClass()) {
  			return false;
  		}
  		ExternalRepositoryInfoImpl other = (ExternalRepositoryInfoImpl) obj;
  		if (this.accessMode != other.accessMode) {
  			return false;
  		}
  		if (this.branches == null) {
  			if (other.branches != null) {
  				return false;
  			}
  		} else if (!this.branches.equals(other.branches)) {
  			return false;
  		}
  		return true;
  	}
  
  } //ExternalRepositoryInfoImpl
  