## org.apache.mahout.cf.taste.impl.recommender
Class GenericRecommendedItem

    java.lang.Object
      org.apache.mahout.cf.taste.impl.recommender.GenericRecommendedItem

All Implemented Interfaces:
  Serializable, RecommendedItem

    public final class GenericRecommendedItem

extends Object
implements RecommendedItem, Serializable

A simple implementation of `RecommendedItem`.

See Also:
  Serialized Form

Constructor Summary
`GenericRecommendedItem(long itemID, float value)`

Method Summary
`boolean` `equals(Object o)`
`long` `getItemID()`
`float` `getValue()` A value expressing the strength of the preference for the recommended item.
`int` `hashCode()`
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### GenericRecommendedItem

    public GenericRecommendedItem(long itemID,
                                  float value)

Throws:
  `IllegalArgumentException` - if item is null or value is NaN

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

### 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.