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

java.lang.Object
  extended by org.apache.mahout.cf.taste.hadoop.ItemPrefWritable
All Implemented Interfaces:
org.apache.hadoop.io.Writable

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

A Writable encapsulating an item ID and a preference value.


Constructor Summary
ItemPrefWritable()
           
ItemPrefWritable(ItemPrefWritable other)
           
ItemPrefWritable(long itemID, float prefValue)
           
 
Method Summary
 long getItemID()
           
 float getPrefValue()
           
static ItemPrefWritable read(java.io.DataInput in)
           
 void readFields(java.io.DataInput in)
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemPrefWritable

public ItemPrefWritable()

ItemPrefWritable

public ItemPrefWritable(long itemID,
                        float prefValue)

ItemPrefWritable

public ItemPrefWritable(ItemPrefWritable other)
Method Detail

getItemID

public long getItemID()

getPrefValue

public float getPrefValue()

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
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
Throws:
java.io.IOException

read

public static ItemPrefWritable read(java.io.DataInput in)
                             throws java.io.IOException
Throws:
java.io.IOException


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