public abstract class TopNMetricBuilder<K> extends Object implements org.apache.commons.lang3.builder.Builder<K>
Modifier and Type | Field and Description |
---|---|
protected ItemSelector |
candidates |
protected ItemSelector |
exclude |
protected int |
listSize |
protected String |
prefix |
protected String |
suffix |
Constructor and Description |
---|
TopNMetricBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract K |
build() |
ItemSelector |
getCandidates()
Get the candidate item selector.
|
ItemSelector |
getExclude()
Get the exclude item selector.
|
int |
getListSize()
Get the list size.
|
String |
getPrefix()
Get the prefix (or null if no prefix is set) to be applied to each column label.
|
String |
getSuffix()
Get the suffix (or null if no suffix is set) to be applied to each column label.
|
void |
setCandidates(ItemSelector sel)
Set the candidate selector.
|
void |
setExclude(ItemSelector sel)
Set the exclude item selector.
|
void |
setListSize(int n)
Set the recommendation list size.
|
void |
setPrefix(String prefix)
Set the prefix to be applied to each column label.
|
void |
setSuffix(String suffix)
Set the suffix to be applied to each column label.
|
protected int listSize
protected ItemSelector candidates
protected ItemSelector exclude
protected String prefix
protected String suffix
public int getListSize()
public ItemSelector getCandidates()
public ItemSelector getExclude()
public String getPrefix()
public String getSuffix()
public void setListSize(int n)
n
- The recommendation list size.public void setCandidates(ItemSelector sel)
ItemSelectors.testItems()
.sel
- The candidate item selector.public void setExclude(ItemSelector sel)
ItemSelectors.trainingItems()
.sel
- The exclude item selector.public void setPrefix(String prefix)
prefix
- the prefix to apply or null
to set no prefix.public void setSuffix(String suffix)
suffix
- the suffix to apply or null
to set no suffix.