import java.util.Iterator;
/**
* Represents a simple graph vertex, using an adjacency list.
* @author astjohn
*
*/
public interface GraphVertex
{
/**
* Get the ID of this vertex.
*/
public int getID();
/**
* Add/update an attribute.
*/
public void setAttribute( String name, Object value );
/**
* Get the value for an attribute; null if the attribute is
* not set.
*/
public Object getAttribute( String name );
/**
* Get all attribute names, as an Iterator<String>.
*/
public Iterator<String> getAttributeNames();
/**
* Add a neighbor to this vertex.
*/
public void addNeighbor( GraphVertex neighbor );
/**
* Check if the vertex with the given ID is a neighbor.
*/
public boolean hasNeighbor( int neighborID );
/**
* Remove vertex with the given ID from neighbors;
* does nothing if not a neighbor.
*/
public void removeNeighbor( int neighborID );
/**
* Get the neighbors for this vertex.
*/
public Iterator<GraphVertex> getNeighbors();
/**
* Get the number of neighbors for this vertex.
*/
public int numNeighbors();
}