Package org.opt4j.operator
Class AbstractGenericOperator.OperatorClassPredicate
- java.lang.Object
-
- org.opt4j.operator.AbstractGenericOperator.OperatorClassPredicate
-
- All Implemented Interfaces:
AbstractGenericOperator.OperatorPredicate
- Enclosing class:
- AbstractGenericOperator<O extends Operator<?>,Q extends Operator<?>>
public static class AbstractGenericOperator.OperatorClassPredicate extends Object implements AbstractGenericOperator.OperatorPredicate
TheAbstractGenericOperator.OperatorClassPredicatereturnstruefor a given specific class.
-
-
Constructor Summary
Constructors Constructor Description OperatorClassPredicate(Class<? extends Genotype> clazz)Creates a newAbstractGenericOperator.OperatorClassPredicatefor the givenGenotypeclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)booleanevaluate(Genotype genotype)Checks whether aGenotypesatisfies the predicate.Class<? extends Genotype>getClazz()Returns the genotype class for the operator.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
OperatorClassPredicate
public OperatorClassPredicate(Class<? extends Genotype> clazz)
Creates a newAbstractGenericOperator.OperatorClassPredicatefor the givenGenotypeclass.- Parameters:
clazz- the class of the genotype
-
-
Method Detail
-
evaluate
public boolean evaluate(Genotype genotype)
Description copied from interface:AbstractGenericOperator.OperatorPredicateChecks whether aGenotypesatisfies the predicate.- Specified by:
evaluatein interfaceAbstractGenericOperator.OperatorPredicate- Parameters:
genotype- the genotype- Returns:
trueif the predicate is satisfied
-
getClazz
public Class<? extends Genotype> getClazz()
Returns the genotype class for the operator.- Returns:
- the genotype class
-
-