Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.graph.def
Interface NodeCollection

All Superinterfaces:
  java.io.Serializable

All Known Implementing Classes:
  ProcessDefinition, SuperState

    public interface NodeCollection

extends java.io.Serializable

is a common supertype for a ProcessDefinition and a SuperState.

Method Summary
`Node` | `addNode(Node node)` adds the given node to this node-collection.
`Node` | `findNode(java.lang.String hierarchicalName)` finds the node by the given hierarchical name.
`java.lang.String` | `generateNodeName()` generates a new name for a node to be added to this collection.
`Node` | `getNode(java.lang.String name)` retrieves a node by name.
`java.util.List` | `getNodes()` is the ordered list of nodes.
`java.util.Map` | `getNodesMap()` maps node-names to nodes.
`boolean` | `hasNode(java.lang.String name)` is true if this node-collection contains a node with the given name, false otherwise.
`Node` | `removeNode(Node node)` removes the given node from this node-collection.
`void` | `reorderNode(int oldIndex, int newIndex)` changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex.

Method Detail

### getNodes

    java.util.List getNodes()

  is the ordered list of nodes.

### getNodesMap

    java.util.Map getNodesMap()

  maps node-names to nodes. returns an empty map if no nodes are contained.

### getNode

    Node getNode(java.lang.String name)

  retrieves a node by name.

  Returns:
    the node or null if no such node is present.

### hasNode

    boolean hasNode(java.lang.String name)

  is true if this node-collection contains a node with the given name, false otherwise.

### addNode

    Node addNode(Node node)

  adds the given node to this node-collection.

  Returns:
    the added node.
  Throws:
    `java.lang.IllegalArgumentException` - if node is null.

### removeNode

    Node removeNode(Node node)

  removes the given node from this node-collection.

  Returns:
    the removed node or null if the node was not present in this collection.
  Throws:
    `java.lang.IllegalArgumentException` - if node is null or if the node is not contained in this nodecollection.

### reorderNode

    void reorderNode(int oldIndex,
                     int newIndex)

  changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex. All nodes inbetween the old and the new index shift one index position.

  Throws:
    `java.lang.IndexOutOfBoundsException`

### generateNodeName

    java.lang.String generateNodeName()

  generates a new name for a node to be added to this collection.

### findNode

    Node findNode(java.lang.String hierarchicalName)

  finds the node by the given hierarchical name. use .. for the parent, use slashes '/' to separate the node names.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD