com.intel.hadoop.graphbuilder.graph
Class Vertex<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.graph.Vertex<VidType,VertexData>
Type Parameters:
VidType - the type of vertex id.
VertexData - the type of vertex data.

public class Vertex<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable>
extends java.lang.Object

Represents a vertex object with id and vertex data.


Constructor Summary
Vertex()
          Default constructor.
Vertex(VidType vid, VertexData vdata)
          Creates a vertex with given vertex id and vertex data.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 void set(VidType vid, VertexData vdata)
          Set the vertex fields with given vertex id and data, overwriting existing fields.
 java.lang.String toString()
           
 VertexData vdata()
          Returns the data of the vertex.
 VidType vid()
          Returns the id of the vertex.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vertex

public Vertex()
Default constructor. Creates an empty vertex.


Vertex

public Vertex(VidType vid,
              VertexData vdata)
Creates a vertex with given vertex id and vertex data.

Parameters:
vid -
vdata -
Method Detail

vid

public VidType vid()
Returns the id of the vertex.


vdata

public VertexData vdata()
Returns the data of the vertex.


set

public void set(VidType vid,
                VertexData vdata)
Set the vertex fields with given vertex id and data, overwriting existing fields.

Parameters:
vid - the id of the new vertex.
vdata - the data of the new vertex.

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object