Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java126
1 files changed, 50 insertions, 76 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java
index 54ad64f5be1..feaf03815b4 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/impl/TwistWithCovarianceImpl.java
@@ -1,26 +1,22 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
+/**
+ */
package org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.impl;
import java.util.Collection;
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.EObjectImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
import org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.Geometry_datatypesPackage;
import org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.Twist;
import org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.TwistWithCovariance;
@@ -32,23 +28,18 @@ import org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTyp
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.impl.TwistWithCovarianceImpl#getTwist
- * <em>Twist</em>}</li>
- * <li>
- * {@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.impl.TwistWithCovarianceImpl#getCovariance
- * <em>Covariance</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.impl.TwistWithCovarianceImpl#getTwist <em>Twist</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.impl.TwistWithCovarianceImpl#getCovariance <em>Covariance</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
-public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCovariance {
-
+public class TwistWithCovarianceImpl extends MinimalEObjectImpl.Container implements TwistWithCovariance {
/**
* The cached value of the '{@link #getTwist() <em>Twist</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getTwist()
* @generated
* @ordered
@@ -59,7 +50,6 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
* The cached value of the '{@link #getCovariance() <em>Covariance</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getCovariance()
* @generated
* @ordered
@@ -69,7 +59,6 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected TwistWithCovarianceImpl() {
@@ -79,7 +68,6 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -90,7 +78,6 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public Twist getTwist() {
@@ -100,18 +87,14 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public NotificationChain basicSetTwist(Twist newTwist, NotificationChain msgs) {
Twist oldTwist = twist;
twist = newTwist;
- if(eNotificationRequired()) {
+ if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST, oldTwist, newTwist);
- if(msgs == null)
- msgs = notification;
- else
- msgs.add(notification);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
@@ -119,31 +102,29 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setTwist(Twist newTwist) {
- if(newTwist != twist) {
+ if (newTwist != twist) {
NotificationChain msgs = null;
- if(twist != null)
+ if (twist != null)
msgs = ((InternalEObject)twist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST, null, msgs);
- if(newTwist != null)
+ if (newTwist != null)
msgs = ((InternalEObject)newTwist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST, null, msgs);
msgs = basicSetTwist(newTwist, msgs);
- if(msgs != null)
- msgs.dispatch();
- } else if(eNotificationRequired())
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST, newTwist, newTwist));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<Double> getCovariance() {
- if(covariance == null) {
+ if (covariance == null) {
covariance = new EDataTypeUniqueEList<Double>(Double.class, this, Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE);
}
return covariance;
@@ -152,14 +133,13 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch(featureID) {
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
- return basicSetTwist(null, msgs);
+ switch (featureID) {
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
+ return basicSetTwist(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -167,16 +147,15 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
- return getTwist();
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
- return getCovariance();
+ switch (featureID) {
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
+ return getTwist();
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
+ return getCovariance();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -184,20 +163,19 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
- setTwist((Twist)newValue);
- return;
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
- getCovariance().clear();
- getCovariance().addAll((Collection<? extends Double>)newValue);
- return;
+ switch (featureID) {
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
+ setTwist((Twist)newValue);
+ return;
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
+ getCovariance().clear();
+ getCovariance().addAll((Collection<? extends Double>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -205,18 +183,17 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
- setTwist((Twist)null);
- return;
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
- getCovariance().clear();
- return;
+ switch (featureID) {
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
+ setTwist((Twist)null);
+ return;
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
+ getCovariance().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -224,16 +201,15 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
- switch(featureID) {
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
- return twist != null;
- case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
- return covariance != null && !covariance.isEmpty();
+ switch (featureID) {
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__TWIST:
+ return twist != null;
+ case Geometry_datatypesPackage.TWIST_WITH_COVARIANCE__COVARIANCE:
+ return covariance != null && !covariance.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -241,13 +217,11 @@ public class TwistWithCovarianceImpl extends EObjectImpl implements TwistWithCov
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if(eIsProxy())
- return super.toString();
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (covariance: ");

Back to the top