blob: eb7a3bb9f14dcc9a5d7dd41fe85e77c73109d74e [file] [log] [blame]
/*
* Copyright (c) 2006 IBM Corporation and others.
* 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:
* IBM - initial API and implementation
* Eike Stepper - bug 540814
*
*/
package org.eclipse.uml2.uml.cdo.internal.util;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.InternalEObject;
/**
* @since 1.2
*/
public class SubsetSupersetEObjectResolvingEList<E>
extends SubsetSupersetEObjectEList<E> {
private static final long serialVersionUID = 1L;
public static class Unsettable<E>
extends SubsetSupersetEObjectResolvingEList<E> {
private static final long serialVersionUID = 1L;
protected boolean isSet;
public Unsettable(Class<?> dataClass, InternalEObject owner,
int featureID, int[] supersetFeatureIDs, int[] subsetFeatureIDs) {
super(dataClass, owner, featureID, supersetFeatureIDs,
subsetFeatureIDs);
}
@Override
protected void didChange() {
isSet = true;
}
@Override
public boolean isSet() {
return isSet;
}
@Override
public void unset() {
super.unset();
if (isNotificationRequired()) {
boolean oldIsSet = isSet;
isSet = false;
owner.eNotify(createNotification(Notification.UNSET, oldIsSet,
false));
} else {
isSet = false;
}
}
}
public SubsetSupersetEObjectResolvingEList(Class<?> dataClass,
InternalEObject owner, int featureID, int[] supersetFeatureIDs,
int[] subsetFeatureIDs) {
super(dataClass, owner, featureID, supersetFeatureIDs, subsetFeatureIDs);
}
@Override
protected boolean hasProxies() {
return true;
}
// @SuppressWarnings("unchecked")
// @Override
// protected E resolve(int index, E object) {
// return (E) resolve(index, (EObject) object);
// }
}