org.apache.mahout.cf.taste.impl.recommender
Class GenericRecommendedItem
java.lang.Object
org.apache.mahout.cf.taste.impl.recommender.GenericRecommendedItem
- All Implemented Interfaces:
- java.io.Serializable, RecommendedItem
public final class GenericRecommendedItem
- extends java.lang.Object
- implements RecommendedItem, java.io.Serializable
A simple implementation of RecommendedItem
.
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object o)
|
long |
getItemID()
|
float |
getValue()
A value expressing the strength of the preference for the recommended item. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
GenericRecommendedItem
public GenericRecommendedItem(long itemID,
float value)
- Throws:
java.lang.IllegalArgumentException
- if item is null or value is NaN
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
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.