@Shareable public class RatingRangeClampingFunction extends Object implements ClampingFunction, Serializable
PreferenceDomain
to clamp values to fall within the minimum
and maximum allowable ratings.Constructor and Description |
---|
RatingRangeClampingFunction(PreferenceDomain dom) |
Modifier and Type | Method and Description |
---|---|
double |
apply(long user,
long item,
double value)
Clamp a value.
|
@Inject public RatingRangeClampingFunction(PreferenceDomain dom)
public double apply(long user, long item, double value)
ClampingFunction
apply
in interface ClampingFunction
user
- The user ID.item
- The item ID.value
- The value to clamp.