Package org.codehaus.plexus.util.dag

# Class Vertex

java.lang.Object
org.codehaus.plexus.util.dag.Vertex

All Implemented Interfaces:
  `Serializable`, `Cloneable`

public class Vertex extends Object implements Cloneable, Serializable

Author:
  Michal Maczka
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`Vertex(String label)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addEdgeFrom(Vertex vertex)`
`void`
`addEdgeTo(Vertex vertex)`
`Object`
`clone()`
`List<String>`
`getChildLabels()`
Get the labels used by the most direct children.
`List<Vertex>`
`getChildren()`
`String`
`getLabel()`
`List<String>`
`getParentLabels()`
Get the labels used by the most direct ancestors (parents).
`List<Vertex>`
`getParents()`
Get the list the most direct ancestors (parents).
`boolean`
`isConnected()`
Indicates if there is at least one edee leading to or from given vertex
`boolean`
`isLeaf()`
Indicates if given vertex has no child
`boolean`
`isRoot()`
Indicates if given vertex has no parent
`void`
`removeEdgeFrom(Vertex vertex)`
`void`
`removeEdgeTo(Vertex vertex)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Vertex

public Vertex(String label)

## Method Details

### getLabel

public String getLabel()

### addEdgeTo

public void addEdgeTo(Vertex vertex)

### removeEdgeTo

public void removeEdgeTo(Vertex vertex)

### addEdgeFrom

public void addEdgeFrom(Vertex vertex)

### removeEdgeFrom

public void removeEdgeFrom(Vertex vertex)

### getChildren

public List<Vertex> getChildren()

### getChildLabels

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

Returns:
  the labels used by the most direct children.

### getParents

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

Returns:
  list of parents

### getParentLabels

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

Returns:
  the labels used parents

### 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

### 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

### clone

public Object clone() throws CloneNotSupportedException

Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`