public class Vertex extends Object implements Cloneable, Serializable
Modifier and Type | Method and 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() |
public Vertex(String label)
public String getLabel()
public void addEdgeTo(Vertex vertex)
public void removeEdgeTo(Vertex vertex)
public void addEdgeFrom(Vertex vertex)
public void removeEdgeFrom(Vertex vertex)
public List<String> getChildLabels()
public List<Vertex> getParents()
public List<String> getParentLabels()
public boolean isLeaf()
true
if this vertex has no child, false
otherwisepublic boolean isRoot()
true
if this vertex has no parent, false
otherwisepublic boolean isConnected()
true
if this vertex is connected with other vertex,false
otherwisepublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.