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

## uchicago.src.sim.network
Class EdgeFactory

    java.lang.Object
      uchicago.src.sim.network.EdgeFactory

    public class EdgeFactory

extends java.lang.Object

Utility methods for creating Edges.

Version:
  $Revision: 1.5 $ $Date: 2004/11/03 19:51:01 $

Constructor Summary
`EdgeFactory()`

Method Summary
`static Edge` | `createCustomEdge(Node from, Node to, java.lang.Class edgeClass)` Constructs an edge from the specified from node to the specified to node with a blank label.
`static Edge` | `createCustomEdge(Node from, Node to, java.lang.String label, java.lang.Class edgeClass)` Construct an Edge from the specified from node to the specified to node with the specified label, and a default strength of 1.0.
`static Edge` | `createCustomEdge(Node from, Node to, java.lang.String label, float strength, java.lang.Class edgeClass)` Construct an edge from the specified from node to the specified to node with the specified label, and the specified strength.
`static DefaultDrawableEdge` | `createDrawableEdge(Node from, Node to)` Constructs an edge from the specified to node to the specified node with a blank label.
`static DefaultDrawableEdge` | `createDrawableEdge(Node from, Node to, java.lang.String label)` Constructs an edge from the specified node to the specified node with the specified label, and a default strength of 1.0.
`static DefaultDrawableEdge` | `createDrawableEdge(Node from, Node to, java.lang.String label, float strength)` Constructs an edge from the specified from node to the specified to node with the specified label, and the specified strength.
`static DefaultEdge` | `createEdge(Node from, Node to)` Constructs an edge from the specified node to the specified node with a blank label.
`static DefaultEdge` | `createEdge(Node from, Node to, java.lang.String label)` Construct an edge from the specified node to the specified node with the specified label, and a default strength of 1.0.
`static DefaultEdge` | `createEdge(Node from, Node to, java.lang.String label, float strength)` Construct an edge from the specified node to the specified node with the specified label, and the specified strength.
`static Edge` | `linkNodes(Node from, Node to, Edge edge)` Links the specified Nodes with the specified Edge.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EdgeFactory

    public EdgeFactory()

Method Detail

### linkNodes

    public static Edge linkNodes(Node from,
                                 Node to,
                                 Edge edge)

  Links the specified Nodes with the specified Edge.

  Parameters:
    `from` - the Node from which the edge proceeds
    `to` - the Node to which the edge proceeds
    `edge` - the edge to link the two Nodes

### createEdge

    public static DefaultEdge createEdge(Node from,
                                         Node to,
                                         java.lang.String label)

  Construct an edge from the specified node to the specified node with the specified label, and a default strength of 1.0. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - for this edge

### createEdge

    public static DefaultEdge createEdge(Node from,
                                         Node to,
                                         java.lang.String label,
                                         float strength)

  Construct an edge from the specified node to the specified node with the specified label, and the specified strength. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - the label for this edge
    `strength` - the strength of this edge

### createEdge

    public static DefaultEdge createEdge(Node from,
                                         Node to)

  Constructs an edge from the specified node to the specified node with a blank label. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node

### createDrawableEdge

    public static DefaultDrawableEdge createDrawableEdge(Node from,
                                                         Node to,
                                                         java.lang.String label)

  Constructs an edge from the specified node to the specified node with the specified label, and a default strength of 1.0. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - for this edge

### createDrawableEdge

    public static DefaultDrawableEdge createDrawableEdge(Node from,
                                                         Node to,
                                                         java.lang.String label,
                                                         float strength)

  Constructs an edge from the specified from node to the specified to node with the specified label, and the specified strength. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - the label for this edge
    `strength` - the strength of this edge

### createDrawableEdge

    public static DefaultDrawableEdge createDrawableEdge(Node from,
                                                         Node to)

  Constructs an edge from the specified to node to the specified node with a blank label. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node

### createCustomEdge

    public static Edge createCustomEdge(Node from,
                                        Node to,
                                        java.lang.String label,
                                        java.lang.Class edgeClass)

  Construct an Edge from the specified from node to the specified to node with the specified label, and a default strength of 1.0. The Edge itself is created from the specified Class. This Class must implement the Edge interface and have a no argument constructor. Note that this method is slower than creating edges of this Class type by hand. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - for this edge
    `edgeClass` - the Class to create the Edge from

### createCustomEdge

    public static Edge createCustomEdge(Node from,
                                        Node to,
                                        java.lang.String label,
                                        float strength,
                                        java.lang.Class edgeClass)

  Construct an edge from the specified from node to the specified to node with the specified label, and the specified strength. The Edge itself is created from the specified Class. This Class must implement the Edge interface and have a no argument constructor. Note that this method is slower than creating edges of this Class type by hand. This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `label` - the label for this edge
    `strength` - the strength of this edge
    `edgeClass` - the Class to create the Edge from

### createCustomEdge

    public static Edge createCustomEdge(Node from,
                                        Node to,
                                        java.lang.Class edgeClass)

  Constructs an edge from the specified from node to the specified to node with a blank label. The Edge itself is created from the specified Class. This Class must implement the Edge interface and have a no argument constructor. Note that this method is slower than creating edges of this Class type by hand.This edge is automatically added to the from and to Nodes as an out and in edge respectively.

  Parameters:
    `from` - the from Node
    `to` - the to Node
    `edgeClass` - the Class to create the Edge from

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