public class BfsNode extends Object implements org.apache.hadoop.io.Writable
| Modifier and Type | Class and Description |
|---|---|
static class |
BfsNode.Type |
| Constructor and Description |
|---|
BfsNode() |
| Modifier and Type | Method and Description |
|---|---|
static BfsNode |
create(byte[] bytes)
Creates object from a byte array.
|
static BfsNode |
create(DataInput in)
Creates object from a
DataInput. |
tl.lin.data.array.ArrayListOfIntsWritable |
getAdjacenyList() |
int |
getDistance() |
int |
getNodeId() |
BfsNode.Type |
getType() |
void |
readFields(DataInput in)
Deserializes this object.
|
byte[] |
serialize()
Returns the serialized representation of this object as a byte array.
|
void |
setAdjacencyList(tl.lin.data.array.ArrayListOfIntsWritable l) |
void |
setDistance(int d) |
void |
setNodeId(int n) |
void |
setType(BfsNode.Type type) |
String |
toString() |
void |
write(DataOutput out)
Serializes this object.
|
public int getDistance()
public void setDistance(int d)
public int getNodeId()
public void setNodeId(int n)
public tl.lin.data.array.ArrayListOfIntsWritable getAdjacenyList()
public void setAdjacencyList(tl.lin.data.array.ArrayListOfIntsWritable l)
public BfsNode.Type getType()
public void setType(BfsNode.Type type)
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic static BfsNode create(DataInput in) throws IOException
DataInput.in - source for reading the serialized representationIOExceptionpublic static BfsNode create(byte[] bytes) throws IOException
bytes - raw serialized representationIOExceptionCopyright © 2015. All rights reserved.