public class VertexImpl extends Object implements Vertex
| Modifier and Type | Field and Description |
|---|---|
protected Object |
object
The object that the vertex represents.
|
| Constructor and Description |
|---|
VertexImpl()
Constructor that initializes this.object to null
|
VertexImpl(Object newobject)
Creates a new Vertex object that initializes this.object to newobject
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLabel()
Returns the label for this vertex.
|
Object |
getObject()
Getter method that returns the object that the Vertex represents
|
boolean |
hasLabel() |
void |
setLabel(String label)
Set the label on this component.
|
void |
setObject(Object newobject)
Setter method sets this.object to newobject
|
String |
toString()
If setString() has never been called, this
method then simply calls this.object.toString().
|
protected Object object
public VertexImpl()
public VertexImpl(Object newobject)
newobject - The object that the Vertex will encapsulatepublic Object getObject()
public void setObject(Object newobject)
public boolean hasLabel()
hasLabel in interface LabeledGraphComponentpublic String getLabel()
Initially, when the vertex is created, the label is the the value
of the toString() method of the object passed-in to the constructor.
In the case of the constructor with no argument called, the label
is initially "
getLabel in interface LabeledGraphComponentpublic void setLabel(String label)
LabeledGraphComponentsetLabel in interface LabeledGraphComponentlabel - the new label to assign to the componentCopyright © 2019 JULIE Lab, Germany. All rights reserved.