org.unigram.likelike.common
Class RelatedUsersWritable

java.lang.Object
  extended by org.unigram.likelike.common.RelatedUsersWritable
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class RelatedUsersWritable
extends java.lang.Object
implements org.apache.hadoop.io.Writable


Constructor Summary
RelatedUsersWritable()
          Constructor.
RelatedUsersWritable(java.util.List<org.apache.hadoop.io.LongWritable> users)
          Constructor.
RelatedUsersWritable(java.lang.Long id)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          equals.
 java.util.List<org.apache.hadoop.io.LongWritable> getRelatedUsers()
          Get related users.
 int hashCode()
          hashCode.
 void readFields(java.io.DataInput in)
          Create RelatedUsersWritable from input stream.
 java.lang.String toString()
          Create String.
 void write(java.io.DataOutput out)
          write.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelatedUsersWritable

public RelatedUsersWritable()
Constructor.


RelatedUsersWritable

public RelatedUsersWritable(java.util.List<org.apache.hadoop.io.LongWritable> users)
Constructor.

Parameters:
users - related users

RelatedUsersWritable

public RelatedUsersWritable(java.lang.Long id)
Constructor.

Parameters:
id - related user id
Method Detail

getRelatedUsers

public java.util.List<org.apache.hadoop.io.LongWritable> getRelatedUsers()
Get related users.

Returns:
set of related users

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Create RelatedUsersWritable from input stream.

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Parameters:
in - input stream
Throws:
java.io.IOException - -

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
write.

Specified by:
write in interface org.apache.hadoop.io.Writable
Parameters:
out - output stream
Throws:
java.io.IOException - -

toString

public java.lang.String toString()
Create String.

Overrides:
toString in class java.lang.Object
Returns:
string reprsents for the related users.

equals

public boolean equals(java.lang.Object o)
equals.

Overrides:
equals in class java.lang.Object
Parameters:
o - checked whether o is identical to this or not
Returns:
true when o is identical to this, otherwise return true

hashCode

public int hashCode()
hashCode.

Overrides:
hashCode in class java.lang.Object
Returns:
hash value