if (!(object instanceof EObject)) return false;
return false; } else if (isContainment()) {
  public boolean contains(Object object)  {    if (isEObject())    {      if (size > 4)      {        if (isContainment())        {          if (!(object instanceof EObject)) return false;          InternalEObject eObject = (InternalEObject)object;          return             eObject.eContainer() == owner &&               (hasNavigableInverse() ?                  eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID(), dataClass) == getInverseFeatureID() :                 InternalEObject.EOPPOSITE_FEATURE_BASE - eObject.eContainerFeatureID() == getFeatureID());        }        // We can also optimize single valued reverse.         //        else if (hasNavigableInverse() && !hasManyInverse())        {          return object instanceof EObject && ((EObject)object).eGet(getInverseEReference()) == owner;        }      }      boolean result = super.contains(object);      if (hasProxies() && !result)      {        for (int i = 0; i < size; ++i)        {          EObject eObject = resolveProxy((EObject)data[i]);          if (eObject == object)          {            return true;          }        }      }      return result;    }    else    {      return super.contains(object);    }  }