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/sensor_datatypes/impl/JointStateImpl.java')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/impl/JointStateImpl.java157
1 files changed, 66 insertions, 91 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/impl/JointStateImpl.java b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/impl/JointStateImpl.java
index 45328bbfe0d..de70ca050ef 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/impl/JointStateImpl.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/impl/JointStateImpl.java
@@ -1,22 +1,17 @@
-/*****************************************************************************
- * 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.sensor_datatypes.impl;
import java.util.Collection;
import org.eclipse.emf.common.util.EList;
+
import org.eclipse.emf.ecore.EClass;
-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.sensor_datatypes.JointState;
import org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.Sensor_datatypesPackage;
@@ -27,25 +22,20 @@ 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.sensor_datatypes.impl.JointStateImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getPosition <em>
- * Position</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getVelocity <em>
- * Velocity</em>}</li>
- * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getEffort <em>Effort
- * </em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getPosition <em>Position</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getVelocity <em>Velocity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.impl.JointStateImpl#getEffort <em>Effort</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
-public class JointStateImpl extends EObjectImpl implements JointState {
-
+public class JointStateImpl extends MinimalEObjectImpl.Container implements JointState {
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getName()
* @generated
* @ordered
@@ -56,7 +46,6 @@ public class JointStateImpl extends EObjectImpl implements JointState {
* The cached value of the '{@link #getPosition() <em>Position</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPosition()
* @generated
* @ordered
@@ -67,7 +56,6 @@ public class JointStateImpl extends EObjectImpl implements JointState {
* The cached value of the '{@link #getVelocity() <em>Velocity</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getVelocity()
* @generated
* @ordered
@@ -78,7 +66,6 @@ public class JointStateImpl extends EObjectImpl implements JointState {
* The cached value of the '{@link #getEffort() <em>Effort</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getEffort()
* @generated
* @ordered
@@ -88,7 +75,6 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected JointStateImpl() {
@@ -98,7 +84,6 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -109,11 +94,10 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<String> getName() {
- if(name == null) {
+ if (name == null) {
name = new EDataTypeUniqueEList<String>(String.class, this, Sensor_datatypesPackage.JOINT_STATE__NAME);
}
return name;
@@ -122,11 +106,10 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<Double> getPosition() {
- if(position == null) {
+ if (position == null) {
position = new EDataTypeUniqueEList<Double>(Double.class, this, Sensor_datatypesPackage.JOINT_STATE__POSITION);
}
return position;
@@ -135,11 +118,10 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<Double> getVelocity() {
- if(velocity == null) {
+ if (velocity == null) {
velocity = new EDataTypeUniqueEList<Double>(Double.class, this, Sensor_datatypesPackage.JOINT_STATE__VELOCITY);
}
return velocity;
@@ -148,11 +130,10 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EList<Double> getEffort() {
- if(effort == null) {
+ if (effort == null) {
effort = new EDataTypeUniqueEList<Double>(Double.class, this, Sensor_datatypesPackage.JOINT_STATE__EFFORT);
}
return effort;
@@ -161,20 +142,19 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case Sensor_datatypesPackage.JOINT_STATE__NAME:
- return getName();
- case Sensor_datatypesPackage.JOINT_STATE__POSITION:
- return getPosition();
- case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
- return getVelocity();
- case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
- return getEffort();
+ switch (featureID) {
+ case Sensor_datatypesPackage.JOINT_STATE__NAME:
+ return getName();
+ case Sensor_datatypesPackage.JOINT_STATE__POSITION:
+ return getPosition();
+ case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
+ return getVelocity();
+ case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
+ return getEffort();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -182,29 +162,28 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case Sensor_datatypesPackage.JOINT_STATE__NAME:
- getName().clear();
- getName().addAll((Collection<? extends String>)newValue);
- return;
- case Sensor_datatypesPackage.JOINT_STATE__POSITION:
- getPosition().clear();
- getPosition().addAll((Collection<? extends Double>)newValue);
- return;
- case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
- getVelocity().clear();
- getVelocity().addAll((Collection<? extends Double>)newValue);
- return;
- case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
- getEffort().clear();
- getEffort().addAll((Collection<? extends Double>)newValue);
- return;
+ switch (featureID) {
+ case Sensor_datatypesPackage.JOINT_STATE__NAME:
+ getName().clear();
+ getName().addAll((Collection<? extends String>)newValue);
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__POSITION:
+ getPosition().clear();
+ getPosition().addAll((Collection<? extends Double>)newValue);
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
+ getVelocity().clear();
+ getVelocity().addAll((Collection<? extends Double>)newValue);
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
+ getEffort().clear();
+ getEffort().addAll((Collection<? extends Double>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -212,24 +191,23 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case Sensor_datatypesPackage.JOINT_STATE__NAME:
- getName().clear();
- return;
- case Sensor_datatypesPackage.JOINT_STATE__POSITION:
- getPosition().clear();
- return;
- case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
- getVelocity().clear();
- return;
- case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
- getEffort().clear();
- return;
+ switch (featureID) {
+ case Sensor_datatypesPackage.JOINT_STATE__NAME:
+ getName().clear();
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__POSITION:
+ getPosition().clear();
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
+ getVelocity().clear();
+ return;
+ case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
+ getEffort().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -237,20 +215,19 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
- switch(featureID) {
- case Sensor_datatypesPackage.JOINT_STATE__NAME:
- return name != null && !name.isEmpty();
- case Sensor_datatypesPackage.JOINT_STATE__POSITION:
- return position != null && !position.isEmpty();
- case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
- return velocity != null && !velocity.isEmpty();
- case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
- return effort != null && !effort.isEmpty();
+ switch (featureID) {
+ case Sensor_datatypesPackage.JOINT_STATE__NAME:
+ return name != null && !name.isEmpty();
+ case Sensor_datatypesPackage.JOINT_STATE__POSITION:
+ return position != null && !position.isEmpty();
+ case Sensor_datatypesPackage.JOINT_STATE__VELOCITY:
+ return velocity != null && !velocity.isEmpty();
+ case Sensor_datatypesPackage.JOINT_STATE__EFFORT:
+ return effort != null && !effort.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -258,13 +235,11 @@ public class JointStateImpl extends EObjectImpl implements JointState {
/**
* <!-- 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(" (name: ");

Back to the top