public abstract class AbstractGenericOperator<O extends Operator<?>,Q extends Operator<?>> extends Object implements GenericOperator<O>
GenericOperators.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGenericOperator.OperatorClassPredicate
The
AbstractGenericOperator.OperatorClassPredicate returns true for a given
specific class. |
static interface |
AbstractGenericOperator.OperatorPredicate
The
AbstractGenericOperator.OperatorPredicate interface. |
static class |
AbstractGenericOperator.OperatorVoidPredicate
The
AbstractGenericOperator.OperatorVoidPredicate interface is used as marker for
Operators for which the predicate is not explicitly defined. |
| Constructor and Description |
|---|
AbstractGenericOperator(Class<? extends Q>... clazzes)
Constructs an
AbstractGenericOperator class with the given
clazzes of default operators. |
| Modifier and Type | Method and Description |
|---|---|
void |
addOperator(AbstractGenericOperator.OperatorPredicate predicate,
O operator)
Adds an operator.
|
O |
getOperator(Genotype genotype)
|
Collection<O> |
getOperators()
Returns all classOperators.
|
public AbstractGenericOperator(Class<? extends Q>... clazzes)
AbstractGenericOperator class with the given
clazzes of default operators.clazzes - the default operatorspublic void addOperator(AbstractGenericOperator.OperatorPredicate predicate, O operator)
GenericOperatoraddOperator in interface GenericOperator<O extends Operator<?>>predicate - the operator predicateoperator - The Operatorpublic O getOperator(Genotype genotype)
GenericOperatorgetOperator in interface GenericOperator<O extends Operator<?>>genotype - the genotypepublic Collection<O> getOperators()
GenericOperatorgetOperators in interface GenericOperator<O extends Operator<?>>