org.apache.mahout.cf.taste.hadoop
Class EntityCountWritable

java.lang.Object
  extended by org.apache.mahout.math.VarLongWritable
      extended by org.apache.mahout.cf.taste.hadoop.EntityCountWritable
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<VarLongWritable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<VarLongWritable>

public final class EntityCountWritable
extends VarLongWritable

A Writable encapsulating an item ID and a count .


Constructor Summary
EntityCountWritable()
           
EntityCountWritable(EntityCountWritable other)
           
EntityCountWritable(long itemID, int count)
           
 
Method Summary
 EntityCountWritable clone()
           
 boolean equals(java.lang.Object o)
           
 int getCount()
           
 long getID()
           
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 void set(long id, int count)
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class org.apache.mahout.math.VarLongWritable
compareTo, get, set
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityCountWritable

public EntityCountWritable()

EntityCountWritable

public EntityCountWritable(long itemID,
                           int count)

EntityCountWritable

public EntityCountWritable(EntityCountWritable other)
Method Detail

getID

public long getID()

getCount

public int getCount()

set

public void set(long id,
                int count)

write

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

readFields

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

hashCode

public int hashCode()
Overrides:
hashCode in class VarLongWritable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class VarLongWritable

toString

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

clone

public EntityCountWritable clone()
Overrides:
clone in class VarLongWritable


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.