com.planetj.taste.model
Interface Preference

All Known Implementing Classes:
DetailedPreference, GenericPreference

public interface Preference

A Preference encapsulates an Item and a preference value, which indicates the strength of the preference for it. Preferences are associated to Users.

Author:
Sean Owen

Method Summary
 Item getItem()
           
 User getUser()
           
 double getValue()
           
 void setValue(double value)
          Sets the strength of the preference for this item
 

Method Detail

getUser

@NotNull
User getUser()
Returns:
User who prefers the Item

getItem

@NotNull
Item getItem()
Returns:
Item that is preferred

getValue

double getValue()
Returns:
strength of the preference for that item. Zero should indicate "no preference either way"; positive values indicate preference and negative values indicate dislike

setValue

void setValue(double value)
Sets the strength of the preference for this item

Parameters:
value - new preference