com.intel.hadoop.graphbuilder.preprocess.mapreduce.keyvalue
Class VertexEdgeUnionType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.preprocess.mapreduce.keyvalue.VertexEdgeUnionType<VidType,VertexData,EdgeData>
Type Parameters:
VidType -
VertexData -
EdgeData -
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public abstract class VertexEdgeUnionType<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>
extends java.lang.Object
implements org.apache.hadoop.io.Writable

Abstract union type of Vertex and Edge. Used as intermediate map output value to hold either a vertex or an edge.


Field Summary
static boolean EDGEVAL
           
static boolean VERTEXVAL
           
 
Constructor Summary
VertexEdgeUnionType()
          Creates an empty value.
 
Method Summary
abstract  EdgeData createEdata()
           
abstract  VertexData createVdata()
           
abstract  VidType createVid()
           
 Edge<VidType,EdgeData> edge()
           
 boolean flag()
           
 void init(boolean flag, java.lang.Object value)
          Initialize the value.
 void readFields(java.io.DataInput arg0)
           
 java.lang.String toString()
           
 Vertex<VidType,VertexData> vertex()
           
 void write(java.io.DataOutput arg0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERTEXVAL

public static final boolean VERTEXVAL
See Also:
Constant Field Values

EDGEVAL

public static final boolean EDGEVAL
See Also:
Constant Field Values
Constructor Detail

VertexEdgeUnionType

public VertexEdgeUnionType()
Creates an empty value.

Method Detail

createVid

public abstract VidType createVid()

createVdata

public abstract VertexData createVdata()

createEdata

public abstract EdgeData createEdata()

init

public void init(boolean flag,
                 java.lang.Object value)
Initialize the value.

Parameters:
flag -
value -

flag

public boolean flag()
Returns:
the type flag of the value.

vertex

public Vertex<VidType,VertexData> vertex()
Returns:
the vertex value, used only when flag == VERTEXVAL.

edge

public Edge<VidType,EdgeData> edge()
Returns:
the vertex value, used only when flag == EDGEXVAL.

readFields

public void readFields(java.io.DataInput arg0)
                throws java.io.IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

write

public void write(java.io.DataOutput arg0)
           throws java.io.IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

toString

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