org.unigram.likelike.common
Class SeedClusterId

java.lang.Object
  extended by org.unigram.likelike.common.SeedClusterId
All Implemented Interfaces:
java.lang.Comparable<SeedClusterId>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<SeedClusterId>

public final class SeedClusterId
extends java.lang.Object
implements org.apache.hadoop.io.WritableComparable<SeedClusterId>


Constructor Summary
SeedClusterId()
          Constructor.
SeedClusterId(long seed, long cid)
          Constructor.
 
Method Summary
 int compareTo(SeedClusterId that)
          Compare this into given one.
 boolean equals(java.lang.Object o)
          equals.
 long getClusterId()
          get cluster id.
 long getSeed()
          get hash seed.
 int hashCode()
          hasCode.
 void readFields(java.io.DataInput in)
          readFields.
 java.lang.String toString()
          toString.
 void write(java.io.DataOutput out)
          write.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeedClusterId

public SeedClusterId()
Constructor.


SeedClusterId

public SeedClusterId(long seed,
                     long cid)
Constructor.

Parameters:
seed - hash seed
cid - cluster id
Method Detail

getClusterId

public long getClusterId()
get cluster id.

Returns:
clusterId

getSeed

public long getSeed()
get hash seed.

Returns:
hash seed

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 - -

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
readFields.

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

compareTo

public int compareTo(SeedClusterId that)
Compare this into given one.

Specified by:
compareTo in interface java.lang.Comparable<SeedClusterId>
Parameters:
that - another SeedClusterId object
Returns:
-

hashCode

public int hashCode()
hasCode.

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

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
o - compared object
Returns:
true when given object is the same as this. otherwise return false

toString

public java.lang.String toString()
toString.

Overrides:
toString in class java.lang.Object
Returns:
string