org.apache.commons.graph.contract
Interface Contract

All Known Implementing Classes:
AcyclicContract

public interface Contract

Description of the Interface


Method Summary
 void addEdge(Edge e, Vertex start, Vertex end)
          Adds a feature to the Edge attribute of the Contract object
 void addVertex(Vertex v)
          Adds a feature to the Vertex attribute of the Contract object
 java.lang.Class getInterface()
          getInterface This returns the marker interface which is associated with the Contract.
 void removeEdge(Edge e)
          Description of the Method
 void removeVertex(Vertex v)
          Description of the Method
 void setImpl(DirectedGraph impl)
          The impl that gets passed in is read-only.
 void verify()
          verify - This verifies that the graph it is working on complies.
 

Method Detail

setImpl

void setImpl(DirectedGraph impl)
The impl that gets passed in is read-only. This is the representation of the graph you should work off of. If an edge or vertex addition is illegal to the contract, raise a GraphException with and explanation.


getInterface

java.lang.Class getInterface()
getInterface This returns the marker interface which is associated with the Contract. For instance, AcyclicContract will return AcyclicGraph here.


verify

void verify()
            throws GraphException
verify - This verifies that the graph it is working on complies.

Throws:
GraphException

addEdge

void addEdge(Edge e,
             Vertex start,
             Vertex end)
             throws GraphException
Adds a feature to the Edge attribute of the Contract object

Throws:
GraphException

addVertex

void addVertex(Vertex v)
               throws GraphException
Adds a feature to the Vertex attribute of the Contract object

Throws:
GraphException

removeEdge

void removeEdge(Edge e)
                throws GraphException
Description of the Method

Throws:
GraphException

removeVertex

void removeVertex(Vertex v)
                  throws GraphException
Description of the Method

Throws:
GraphException