org.codehaus.plexus.util.dag

Class Vertex

public class Vertex extends Object implements Cloneable, Serializable

Version: $Id: Vertex.java 8010 2009-01-07 12:59:50Z vsiveton $

Author: Michal Maczka

Constructor Summary
Vertex(String label)
Method Summary
voidaddEdgeFrom(Vertex vertex)
voidaddEdgeTo(Vertex vertex)
Objectclone()
ListgetChildLabels()
Get the labels used by the most direct children.
ListgetChildren()
StringgetLabel()
ListgetParentLabels()
Get the labels used by the most direct ancestors (parents).
ListgetParents()
Get the list the most direct ancestors (parents).
booleanisConnected()
Indicates if there is at least one edee leading to or from given vertex
booleanisLeaf()
Indicates if given vertex has no child
booleanisRoot()
Indicates if given vertex has no parent
voidremoveEdgeFrom(Vertex vertex)
voidremoveEdgeTo(Vertex vertex)
StringtoString()

Constructor Detail

Vertex

public Vertex(String label)

Method Detail

addEdgeFrom

public void addEdgeFrom(Vertex vertex)

Parameters: vertex

addEdgeTo

public void addEdgeTo(Vertex vertex)

Parameters: vertex

clone

public Object clone()

getChildLabels

public List getChildLabels()
Get the labels used by the most direct children.

Returns: the labels used by the most direct children.

getChildren

public List getChildren()

getLabel

public String getLabel()

Returns:

getParentLabels

public List getParentLabels()
Get the labels used by the most direct ancestors (parents).

Returns: the labels used parents

getParents

public List getParents()
Get the list the most direct ancestors (parents).

Returns: list of parents

isConnected

public boolean isConnected()
Indicates if there is at least one edee leading to or from given vertex

Returns: true if this vertex is connected with other vertex,false otherwise

isLeaf

public boolean isLeaf()
Indicates if given vertex has no child

Returns: true if this vertex has no child, false otherwise

isRoot

public boolean isRoot()
Indicates if given vertex has no parent

Returns: true if this vertex has no parent, false otherwise

removeEdgeFrom

public void removeEdgeFrom(Vertex vertex)

removeEdgeTo

public void removeEdgeTo(Vertex vertex)

Parameters: vertex

toString

public String toString()
Copyright © 2001-2010 Codehaus. All Rights Reserved.