|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.cf.taste.impl.recommender.GenericRecommendedItem
public final class GenericRecommendedItem
A simple implementation of RecommendedItem
.
Constructor Summary | |
---|---|
GenericRecommendedItem(long itemID,
float value)
|
Method Summary | |
---|---|
int |
compareTo(RecommendedItem other)
Defines a natural ordering from most-preferred item (highest value) to least-preferred. |
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 |
Constructor Detail |
---|
public GenericRecommendedItem(long itemID, float value)
java.lang.IllegalArgumentException
- if item is null or value is NaNMethod Detail |
---|
public long getItemID()
getItemID
in interface RecommendedItem
public float getValue()
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.
getValue
in interface RecommendedItem
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(RecommendedItem other)
compareTo
in interface java.lang.Comparable<RecommendedItem>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |