|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.planlib.Selector
public class Selector
Default selector implementation for evaluating a set of proposals. The proposals will be first tested on acceptability. In the second (optional) step they will be sorted according to the specified comparator/comparable. In the third step a (sub)set will be filtered out according to the specified number chooseable of resuls (choose).
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
boolean |
isAcceptable(Object proposal)
Test if a proposal is acceptable. |
Object[] |
select(Object[] proposals)
Select proposals. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALL
public static final int ONE
Constructor Detail |
---|
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.Method Detail |
---|
public Object[] select(Object[] proposals)
select
in interface ISelector
proposals
- The proposals.
public boolean isAcceptable(Object proposal)
proposal
- The proposal.
|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.