blob: 986769175682faab8effba4a0c0f02bb9382d195 [file] [log] [blame]
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.gmf.examples.eclipsecon.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.gmf.examples.eclipsecon.EclipseconPackage;
import org.eclipse.gmf.examples.eclipsecon.TimeSlot;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Time Slot</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.gmf.examples.eclipsecon.impl.TimeSlotImpl#getStart <em>Start</em>}</li>
* <li>{@link org.eclipse.gmf.examples.eclipsecon.impl.TimeSlotImpl#getEnd <em>End</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class TimeSlotImpl extends EObjectImpl implements TimeSlot {
/**
* The default value of the '{@link #getStart() <em>Start</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStart()
* @generated
* @ordered
*/
protected static final String START_EDEFAULT = null;
/**
* The cached value of the '{@link #getStart() <em>Start</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStart()
* @generated
* @ordered
*/
protected String start = START_EDEFAULT;
/**
* The default value of the '{@link #getEnd() <em>End</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEnd()
* @generated
* @ordered
*/
protected static final String END_EDEFAULT = null;
/**
* The cached value of the '{@link #getEnd() <em>End</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEnd()
* @generated
* @ordered
*/
protected String end = END_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TimeSlotImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return EclipseconPackage.Literals.TIME_SLOT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getStart() {
return start;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStart(String newStart) {
String oldStart = start;
start = newStart;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, EclipseconPackage.TIME_SLOT__START, oldStart, start));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getEnd() {
return end;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEnd(String newEnd) {
String oldEnd = end;
end = newEnd;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, EclipseconPackage.TIME_SLOT__END, oldEnd, end));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case EclipseconPackage.TIME_SLOT__START:
return getStart();
case EclipseconPackage.TIME_SLOT__END:
return getEnd();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case EclipseconPackage.TIME_SLOT__START:
setStart((String)newValue);
return;
case EclipseconPackage.TIME_SLOT__END:
setEnd((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case EclipseconPackage.TIME_SLOT__START:
setStart(START_EDEFAULT);
return;
case EclipseconPackage.TIME_SLOT__END:
setEnd(END_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case EclipseconPackage.TIME_SLOT__START:
return START_EDEFAULT == null ? start != null : !START_EDEFAULT.equals(start);
case EclipseconPackage.TIME_SLOT__END:
return END_EDEFAULT == null ? end != null : !END_EDEFAULT.equals(end);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (start: ");
result.append(start);
result.append(", end: ");
result.append(end);
result.append(')');
return result.toString();
}
} //TimeSlotImpl