org.eclipse.emf.facet.util.emf.core

## Class CommandFactory

- java.lang.Object
- - org.eclipse.emf.facet.util.emf.core.CommandFactory

    public final class CommandFactory
    extends java.lang.Object

### Method Summary

All Methods Static Methods Concrete Methods
`static Command` `createAddResourceContentsCommand(Resource resource, java.util.Collection<EObject> content)` This method creates a command to add a collection of element to a resource
`static Command` `createAddResourceContentsCommand(Resource resource, EObject eObject)` This method creates a command to add an EObject to a resource
`static Command` `createSetResourceContentsCommand(Resource resource, java.util.Collection<EObject> content)` This method creates a command to set a collection of element to a resource
`static Command` `createSetResourceContentsCommand(Resource resource, EObject eObject)` This method creates a command to set an EObject to a resource

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createSetResourceContentsCommand

    public static Command createSetResourceContentsCommand(Resource resource,
                                                           java.util.Collection<EObject> content)

This method creates a command to set a collection of element to a resource

Parameters:
  `resource` - the resource to set
  `content` - a collection of EObject to set as the content of the resource.
Returns:
  an EMF Command

#### createSetResourceContentsCommand

    public static Command createSetResourceContentsCommand(Resource resource,
                                                           EObject eObject)

This method creates a command to set an EObject to a resource

Parameters:
  `resource` - the resource to set
  `eObject` - an EObject to set as the content of the resource.
Returns:
  an EMF Command

#### createAddResourceContentsCommand

    public static Command createAddResourceContentsCommand(Resource resource,
                                                           java.util.Collection<EObject> content)

This method creates a command to add a collection of element to a resource

Parameters:
  `resource` - the resource to add
  `content` - a collection of EObject to add to the content of the resource.
Returns:
  an EMF Command

#### createAddResourceContentsCommand

    public static Command createAddResourceContentsCommand(Resource resource,
                                                           EObject eObject)

This method creates a command to add an EObject to a resource

Parameters:
  `resource` - the resource to add
  `eObject` - an EObject to add to the content of the resource.
Returns:
  an EMF Command