org.apache.mahout.cf.taste.hadoop
Class MutableRecommendedItem
java.lang.Object
org.apache.mahout.cf.taste.hadoop.MutableRecommendedItem
- All Implemented Interfaces:
- RecommendedItem
public class MutableRecommendedItem
- extends Object
- implements RecommendedItem
Mutable variant of RecommendedItem
MutableRecommendedItem
public MutableRecommendedItem()
MutableRecommendedItem
public MutableRecommendedItem(long itemID,
float value)
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.