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

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

All Implemented Interfaces:
  Comparable<SimilarUser>

    public final class SimilarUser

extends Object
implements Comparable<SimilarUser>

Simply encapsulates a user and a similarity value.

Constructor Summary
`SimilarUser(long userID, double similarity)`

Method Summary
`int` `compareTo(SimilarUser other)` Defines an ordering from most similar to least similar.
`boolean` `equals(Object o)`
`int` `hashCode()`
`String` `toString()`

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

Constructor Detail

### SimilarUser

    public SimilarUser(long userID,
                       double similarity)

Method Detail

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### compareTo

    public int compareTo(SimilarUser other)

  Defines an ordering from most similar to least similar.

  Specified by:
    `compareTo` in interface `Comparable<SimilarUser>`

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