edu.umd.cloud9.example.bfs
Class BFSNode

java.lang.Object
  extended by edu.umd.cloud9.example.bfs.BFSNode
All Implemented Interfaces:
Writable

public class BFSNode
extends Object
implements Writable

Representation of a graph node for parallel breadth-first search.

Author:
Jimmy Lin

Field Summary
static int TYPE_COMPLETE
           
static int TYPE_DISTANCE
           
static int TYPE_STRUCTURE
           
 
Constructor Summary
BFSNode()
           
 
Method Summary
 ArrayListOfIntsWritable getAdjacenyList()
           
 int getDistance()
           
 int getNodeId()
           
 int getType()
           
 void readFields(DataInput in)
          Deserializes this object.
 void setAdjacencyList(ArrayListOfIntsWritable l)
           
 void setDistance(int d)
           
 void setNodeId(int n)
           
 void setType(int type)
           
 String toString()
           
 void write(DataOutput out)
          Serializes this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_COMPLETE

public static final int TYPE_COMPLETE
See Also:
Constant Field Values

TYPE_DISTANCE

public static final int TYPE_DISTANCE
See Also:
Constant Field Values

TYPE_STRUCTURE

public static final int TYPE_STRUCTURE
See Also:
Constant Field Values
Constructor Detail

BFSNode

public BFSNode()
Method Detail

getDistance

public int getDistance()

setDistance

public void setDistance(int d)

getNodeId

public int getNodeId()

setNodeId

public void setNodeId(int n)

getAdjacenyList

public ArrayListOfIntsWritable getAdjacenyList()

setAdjacencyList

public void setAdjacencyList(ArrayListOfIntsWritable l)

getType

public int getType()

setType

public void setType(int type)

readFields

public void readFields(DataInput in)
                throws IOException
Deserializes this object.

Specified by:
readFields in interface Writable
Parameters:
in - source for raw byte representation
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Serializes this object.

Specified by:
write in interface Writable
Parameters:
out - where to write the raw byte representation
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object