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

java.lang.Object
  extended by org.apache.mahout.cf.taste.hadoop.MutableRecommendedItem
All Implemented Interfaces:
RecommendedItem

public class MutableRecommendedItem
extends Object
implements RecommendedItem

Mutable variant of RecommendedItem


Constructor Summary
MutableRecommendedItem()
           
MutableRecommendedItem(long itemID, float value)
           
 
Method Summary
 void capToMaxValue(float maxValue)
           
 boolean equals(Object o)
           
 long getItemID()
           
 float getValue()
           A value expressing the strength of the preference for the recommended item.
 int hashCode()
           
 void set(long itemID, float value)
           
 void setItemID(long itemID)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableRecommendedItem

public MutableRecommendedItem()

MutableRecommendedItem

public MutableRecommendedItem(long itemID,
                              float value)
Method Detail

getItemID

public long getItemID()
Specified by:
getItemID in interface RecommendedItem
Returns:
the recommended item ID

getValue

public float getValue()
Description copied from interface: RecommendedItem

A value expressing the strength of the preference for the recommended item. The range of the values depends on the implementation. Implementations must use larger values to express stronger preference.

Specified by:
getValue in interface RecommendedItem
Returns:
strength of the preference

setItemID

public void setItemID(long itemID)

set

public void set(long itemID,
                float value)

capToMaxValue

public void capToMaxValue(float maxValue)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.