public abstract class TopNMetricBuilder<T extends TopNMetricBuilder,K extends Metric>
extends java.lang.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 java.lang.String |
prefix |
protected java.lang.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.
|
java.lang.String |
getPrefix()
Get the prefix (or null if no prefix is set) to be applied to each column label.
|
java.lang.String |
getSuffix()
Get the suffix (or null if no suffix is set) to be applied to each column label.
|
T |
setCandidates(ItemSelector sel)
Set the candidate selector.
|
T |
setExclude(ItemSelector sel)
Set the exclude item selector.
|
T |
setListSize(int n)
Set the recommendation list size.
|
T |
setPrefix(java.lang.String prefix)
Set the prefix to be applied to each column label.
|
T |
setSuffix(java.lang.String suffix)
Set the suffix to be applied to each column label.
|
protected int listSize
protected ItemSelector candidates
protected ItemSelector exclude
protected java.lang.String prefix
protected java.lang.String suffix
public int getListSize()
public ItemSelector getCandidates()
public ItemSelector getExclude()
public java.lang.String getPrefix()
public java.lang.String getSuffix()
public T setListSize(int n)
n
- The recommendation list size.public T setCandidates(ItemSelector sel)
ItemSelectors.testItems()
.sel
- The candidate item selector.public T setExclude(ItemSelector sel)
ItemSelectors.trainingItems()
.sel
- The exclude item selector.public T setPrefix(java.lang.String prefix)
prefix
- the prefix to apply or null
to set no prefix.public T setSuffix(java.lang.String suffix)
suffix
- the suffix to apply or null
to set no suffix.