/**
* <copyright>
* </copyright>
*
* $Id$
*/
package es.tid.cim.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import es.tid.cim.CimPackage;
import es.tid.cim.IPXProtocolEndpoint;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>IPX Protocol Endpoint</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link es.tid.cim.impl.IPXProtocolEndpointImpl#getAddress <em>Address</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class IPXProtocolEndpointImpl extends ProtocolEndpointImpl implements IPXProtocolEndpoint {
/**
* The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAddress()
* @generated
* @ordered
*/
protected static final String ADDRESS_EDEFAULT = null;
/**
* The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAddress()
* @generated
* @ordered
*/
protected String address = ADDRESS_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IPXProtocolEndpointImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CimPackage.eINSTANCE.getIPXProtocolEndpoint();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getAddress() {
return address;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setAddress(String newAddress) {
String oldAddress = address;
address = newAddress;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CimPackage.IPX_PROTOCOL_ENDPOINT__ADDRESS, oldAddress, address));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CimPackage.IPX_PROTOCOL_ENDPOINT__ADDRESS:
return getAddress();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CimPackage.IPX_PROTOCOL_ENDPOINT__ADDRESS:
setAddress((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CimPackage.IPX_PROTOCOL_ENDPOINT__ADDRESS:
setAddress(ADDRESS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CimPackage.IPX_PROTOCOL_ENDPOINT__ADDRESS:
return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (address: ");
result.append(address);
result.append(')');
return result.toString();
}
} //IPXProtocolEndpointImpl