org.gcube.dir.master.selection.criteria
Class BestScoresCriterion

java.lang.Object
  extended by org.gcube.dir.master.selection.criteria.BestScoresCriterion
All Implemented Interfaces:
SelectionCriterion

public class BestScoresCriterion
extends java.lang.Object
implements SelectionCriterion

A criterion to select all collections with a score above a given threshold.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
BestScoresCriterion(float threshold)
          Creates an instance with a given threshold.
 
Method Summary
 float getThreshold()
          Returns the threshold.
<T extends CollectionRank>
java.util.List<CollectionRank>
select(java.util.List<T> ranking)
          Returns an ordered selection of a ranked list of content sources.
 void setThreshold(float threshold)
          Sets the threshold.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestScoresCriterion

public BestScoresCriterion(float threshold)
Creates an instance with a given threshold.

Parameters:
threshold - the threshold.
Method Detail

select

public <T extends CollectionRank> java.util.List<CollectionRank> select(java.util.List<T> ranking)
Returns an ordered selection of a ranked list of content sources.

Specified by:
select in interface SelectionCriterion
Returns:
the selection.

getThreshold

public float getThreshold()
Returns the threshold.

Returns:
the threshold.

setThreshold

public void setThreshold(float threshold)
Sets the threshold.

Parameters:
threshold. -