public class Selector extends Object implements ISelector
Modifier and Type | Field and Description |
---|---|
static int |
ALL
The constant for specifiying that all proposals should be chosen.
|
static int |
ONE
The constant for specifiying that one proposal should be chosen.
|
Constructor and Description |
---|
Selector()
Create a new selector.
|
Selector(Comparator comp)
Create a new selector.
|
Selector(Comparator comp,
int max_winners)
Create a new selector.
|
Selector(int max_winners)
Create a new selector.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAcceptable(Object proposal)
Test if a proposal is acceptable.
|
Object[] |
select(Object[] proposals)
Select proposals.
|
public static final int ALL
public static final int ONE
public Selector()
public Selector(Comparator comp)
comp
- The optional comparator for sorting proposals.public Selector(int max_winners)
max_winners
- The number of proposals to be chosen at most.public Selector(Comparator comp, int max_winners)
comp
- The optional comparator for sorting proposals.max_winners
- The number of proposals to be chosen at most.Copyright © 2013. All Rights Reserved.