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

## sim.field.network
Class Edge

    java.lang.Object
      sim.field.network.Edge

All Implemented Interfaces:
  java.io.Serializable

public class Edge
extends java.lang.Object
implements java.io.Serializable

An Edge stores a relationship between two objects in a NetworkField. Edges are directed: one object is a "from" object and one object is a "to" object. Edges also hold one object, which is an arbitrary object that you specify on your own. An info object can be used to hold the edge weight, an edge label, or whatever you like. Edges are "semi-mutable": you can change the info object at any time, but you may not change the to or from objects once the Edge has been constructed.

An Edge may be added to at most one NetworkField. You must remove it from that field before you can add it to a new NetworkField. The Edge's field is known as its owner.

See Also:
  Serialized Form

Field Summary
`java.lang.Object` | `info` Other information (maybe cost) associated with the edge

Constructor Summary
`Edge(Edge e)`
`Edge(java.lang.Object from, java.lang.Object to, java.lang.Object info)`

Method Summary
`java.lang.Object` | `from()` Returns the "from" object.
`NetworkField` | `owner()` Returns the "owner" field.
`java.lang.Object` | `to()` Returns the "to" object.

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

Field Detail

### info

    public java.lang.Object info

  Other information (maybe cost) associated with the edge

Constructor Detail

### Edge

    public Edge(Edge e)

### Edge

    public Edge(java.lang.Object from,
                java.lang.Object to,
                java.lang.Object info)

Method Detail

### from

    public java.lang.Object from()

  Returns the "from" object.

### to

    public java.lang.Object to()

  Returns the "to" object.

### owner

    public NetworkField owner()

  Returns the "owner" field.

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