org.apache.mahout.cf.taste.hadoop
Class EntityCountWritable
java.lang.Object
org.apache.mahout.math.VarLongWritable
org.apache.mahout.cf.taste.hadoop.EntityCountWritable
- All Implemented Interfaces:
- Cloneable, 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 .
EntityCountWritable
public EntityCountWritable()
EntityCountWritable
public EntityCountWritable(long itemID,
int count)
EntityCountWritable
public EntityCountWritable(EntityCountWritable other)
getID
public long getID()
getCount
public int getCount()
set
public void set(long id,
int count)
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class VarLongWritable
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class VarLongWritable
- Throws:
IOException
hashCode
public int hashCode()
- Overrides:
hashCode
in class VarLongWritable
equals
public boolean equals(Object o)
- Overrides:
equals
in class VarLongWritable
toString
public String toString()
- Overrides:
toString
in class VarLongWritable
clone
public EntityCountWritable clone()
- Overrides:
clone
in class VarLongWritable
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.