Java Code Examples for org.eclipse.emf.ecore.util.EObjectEList

The following are top voted examples for showing how to use org.eclipse.emf.ecore.util.EObjectEList. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: turnus   File: NetworkImpl.java   View source code 6 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public List<SharedVariable> getSharedVariables() {
	List<SharedVariable> sharedVars = new EObjectEList<SharedVariable>(
			SharedVariable.class, this,
			DataflowPackage.NETWORK__SHARED_VARIABLES);

	for (Actor actor : getActors()) {
		for (Variable variable : actor.getVariables()) {
			if (variable instanceof SharedVariable) {
				sharedVars.add((SharedVariable) variable);
			}
		}
	}

	return sharedVars;
}
 
Example 2
Project: ttc2017smartGrids   File: PointArrayImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<Point> getPoint() {
	if (point == null) {
		point = new EObjectEList<Point>(Point.class, this, DataclassesPackage.POINT_ARRAY__POINT);
	}
	return point;
}
 
Example 3
Project: ttc2017smartGrids   File: PointArrayImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<Point> getPoint() {
	if (point == null) {
		point = new EObjectEList<Point>(Point.class, this, DataclassesPackage.POINT_ARRAY__POINT);
	}
	return point;
}
 
Example 4
Project: rgse.ttc17.emoflon.tgg   File: PointArrayImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<Point> getPoint() {
	if (point == null) {
		point = new EObjectEList<Point>(Point.class, this, DataclassesPackage.POINT_ARRAY__POINT);
	}
	return point;
}
 
Example 5
Project: turnus   File: ArchitectureImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public List<ProcessingUnit> getProcessingUnits(String family) {
	List<ProcessingUnit> pus = new EObjectEList<ProcessingUnit>(
			ProcessingUnit.class, this,
			ArchitecturePackage.ARCHITECTURE___GET_PROCESSING_UNITS__STRING);

	for (ProcessingUnit pu : getProcessingUnits()) {
		if (family.equals(pu.getName())) {
			pus.add(pu);
		}
	}

	return pus;
}
 
Example 6
Project: turnus   File: ActorImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public List<Buffer> getIncomingBuffers() {
	EList<Buffer> buffers = new EObjectEList<Buffer>(Buffer.class, this, DataflowPackage.ACTOR__INCOMING_BUFFERS);
	for (Port port : getInputPorts()) {
		Buffer buffer = port.getInput();
		if (buffer != null && !buffers.contains(buffer)) {
			buffers.add(buffer);
		}
	}
	return buffers;
}
 
Example 7
Project: turnus   File: ActorImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public List<Buffer> getOutgoingBuffers() {
	EList<Buffer> buffers = new EObjectEList<Buffer>(Buffer.class, this, DataflowPackage.ACTOR__OUTGOING_BUFFERS);
	for (Port port : getOutputPorts()) {
		for (Buffer buffer : port.getOutputs()) {
			if (!buffers.contains(buffer)) {
				buffers.add(buffer);
			}
		}
	}
	return buffers;
}
 
Example 8
Project: xtext-core   File: UnresolvedProxyPropertyImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<Type> getType() {
	if (type == null) {
		type = new EObjectEList<Type>(Type.class, this, LazyLinkingPackage.UNRESOLVED_PROXY_PROPERTY__TYPE);
	}
	return type;
}
 
Example 9
Project: NEXCORE-UML-Modeler   File: ContainerNodeImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public EList<AbstractConnection> getConnectionList() {
    if (connectionList == null) {
        connectionList = new EObjectEList<AbstractConnection>(AbstractConnection.class, this, UMLDiagramPackage.CONTAINER_NODE__CONNECTION_LIST);
    }
    return connectionList;
}
 
Example 10
Project: NEXCORE-UML-Modeler   File: AbstractNodeImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public EList<AbstractConnection> getIncomingConnectionList() {
    if (incomingConnectionList == null) {
        incomingConnectionList = new EObjectEList<AbstractConnection>(AbstractConnection.class, this, UMLDiagramPackage.ABSTRACT_NODE__INCOMING_CONNECTION_LIST);
    }
    return incomingConnectionList;
}
 
Example 11
Project: NEXCORE-UML-Modeler   File: AbstractNodeImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public EList<AbstractConnection> getOutgoingConnectionList() {
    if (outgoingConnectionList == null) {
        outgoingConnectionList = new EObjectEList<AbstractConnection>(AbstractConnection.class, this, UMLDiagramPackage.ABSTRACT_NODE__OUTGOING_CONNECTION_LIST);
    }
    return outgoingConnectionList;
}
 
Example 12
Project: NEXCORE-UML-Modeler   File: NotationNodeImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public EList<LabelNode> getLabels() {
    if (labels == null) {
        labels = new EObjectEList<LabelNode>(LabelNode.class, this, UMLDiagramPackage.NOTATION_NODE__LABELS);
    }
    return labels;
}
 
Example 13
Project: SecureBPMN   File: DataAssociationImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public List<ItemAwareElement> getSourceRef() {
	if (sourceRef == null) {
		sourceRef = new EObjectEList<ItemAwareElement>(
				ItemAwareElement.class, this,
				Bpmn2Package.DATA_ASSOCIATION__SOURCE_REF);
	}
	return sourceRef;
}
 
Example 14
Project: fixflow   File: DataAssociationImpl.java   View source code 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public List<ItemAwareElement> getSourceRef() {
    if (sourceRef == null) {
        sourceRef = new EObjectEList<ItemAwareElement>(ItemAwareElement.class, this,
                Bpmn2Package.DATA_ASSOCIATION__SOURCE_REF);
    }
    return sourceRef;
}
 
Example 15
Project: acceleo-launcher-examples   File: LibraryImpl.java   View source code 4 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Book> getBooks()
{
  if (books == null)
  {
    // create a custom list implementation that synchronizes its content
    //    with the "stock" superset
    books = new EObjectEList<Book>(Book.class, this, EXTLibraryPackage.LIBRARY__BOOKS)
      {
        private static final long serialVersionUID = 1L;

        @Override
        protected void didAdd(int index, Book newObject)
        {
          if (getStock().indexOf(newObject) == -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().add(newObject);
          }
        }

        @Override
        protected void didRemove(int index, Book oldObject)
        {
          if (getStock().indexOf(oldObject) != -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().remove(oldObject);
          }
        }

        @Override
        protected void didSet(int index, Book newObject, Book oldObject)
        {
          didRemove(index, oldObject);
          didAdd(index, newObject);
        }
      };
  }

  return books;
}
 
Example 16
Project: econ-na-2014-emf-edit   File: LibraryImpl.java   View source code 4 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Book> getBooks()
{
  if (books == null)
  {
    // create a custom list implementation that synchronizes its content
    //    with the "stock" superset
    books = new EObjectEList<Book>(Book.class, this, EXTLibraryPackage.LIBRARY__BOOKS)
      {
        private static final long serialVersionUID = 1L;

        @Override
        protected void didAdd(int index, Book newObject)
        {
          if (getStock().indexOf(newObject) == -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().add(newObject);
          }
        }

        @Override
        protected void didRemove(int index, Book oldObject)
        {
          if (getStock().indexOf(oldObject) != -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().remove(oldObject);
          }
        }

        @Override
        protected void didSet(int index, Book newObject, Book oldObject)
        {
          didRemove(index, oldObject);
          didAdd(index, newObject);
        }
      };
  }

  return books;
}
 
Example 17
Project: eclipse-avro   File: LibraryImpl.java   View source code 4 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Book> getBooks()
{
  if (books == null)
  {
    // create a custom list implementation that synchronizes its content
    //    with the "stock" superset
    books = new EObjectEList<Book>(Book.class, this, EXTLibraryPackage.LIBRARY__BOOKS)
      {
        private static final long serialVersionUID = 1L;

        @Override
        protected void didAdd(int index, Book newObject)
        {
          if (getStock().indexOf(newObject) == -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().add(newObject);
          }
        }

        @Override
        protected void didRemove(int index, Book oldObject)
        {
          if (getStock().indexOf(oldObject) != -1)
          {
            // these lists are unordered, so index doesn't matter
            getStock().remove(oldObject);
          }
        }

        @Override
        protected void didSet(int index, Book newObject, Book oldObject)
        {
          didRemove(index, oldObject);
          didAdd(index, newObject);
        }
      };
  }

  return books;
}