alun.graph
Class AbstractGraph<V,E>

java.lang.Object
  extended by alun.graph.AbstractGraph<V,E>
All Implemented Interfaces:
Graph<V,E>, MutableGraph<V,E>
Direct Known Subclasses:
Network

public abstract class AbstractGraph<V,E>
extends java.lang.Object
implements MutableGraph<V,E>


Constructor Summary
AbstractGraph()
           
 
Method Summary
 boolean add(V x)
           
 void clear()
           
 boolean connect(V x, V y)
           
 boolean connects(java.lang.Object x, java.lang.Object y)
           
 boolean contains(java.lang.Object x)
           
 boolean disconnect(java.lang.Object x)
           
 boolean disconnect(java.lang.Object x, java.lang.Object y)
           
 java.util.Set<V> getVertices()
           
 java.util.Collection<V> inNeighbours(java.lang.Object x)
           
 java.util.Collection<V> outNeighbours(java.lang.Object x)
           
 boolean remove(java.lang.Object x)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface alun.graph.MutableGraph
connect
 
Methods inherited from interface alun.graph.Graph
connection, getEdges, getNeighbours
 

Constructor Detail

AbstractGraph

public AbstractGraph()
Method Detail

contains

public boolean contains(java.lang.Object x)
Specified by:
contains in interface Graph<V,E>

connects

public boolean connects(java.lang.Object x,
                        java.lang.Object y)
Specified by:
connects in interface Graph<V,E>

getVertices

public java.util.Set<V> getVertices()
Specified by:
getVertices in interface Graph<V,E>

outNeighbours

public java.util.Collection<V> outNeighbours(java.lang.Object x)
Specified by:
outNeighbours in interface Graph<V,E>

inNeighbours

public java.util.Collection<V> inNeighbours(java.lang.Object x)
Specified by:
inNeighbours in interface Graph<V,E>

clear

public void clear()
Specified by:
clear in interface MutableGraph<V,E>

add

public boolean add(V x)
Specified by:
add in interface MutableGraph<V,E>

disconnect

public boolean disconnect(java.lang.Object x)

remove

public boolean remove(java.lang.Object x)
Specified by:
remove in interface MutableGraph<V,E>

connect

public boolean connect(V x,
                       V y)
Specified by:
connect in interface MutableGraph<V,E>

disconnect

public boolean disconnect(java.lang.Object x,
                          java.lang.Object y)
Specified by:
disconnect in interface MutableGraph<V,E>