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.OperatorClassPredicate
returnstrue
for a given specific class.
-
-
Constructor Summary
Constructors Constructor Description OperatorClassPredicate(Class<? extends Genotype> clazz)
Creates a newAbstractGenericOperator.OperatorClassPredicate
for the givenGenotype
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
boolean
evaluate(Genotype genotype)
Checks whether aGenotype
satisfies the predicate.Class<? extends Genotype>
getClazz()
Returns the genotype class for the operator.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
OperatorClassPredicate
public OperatorClassPredicate(Class<? extends Genotype> clazz)
Creates a newAbstractGenericOperator.OperatorClassPredicate
for the givenGenotype
class.- Parameters:
clazz
- the class of the genotype
-
-
Method Detail
-
evaluate
public boolean evaluate(Genotype genotype)
Description copied from interface:AbstractGenericOperator.OperatorPredicate
Checks whether aGenotype
satisfies the predicate.- Specified by:
evaluate
in interfaceAbstractGenericOperator.OperatorPredicate
- Parameters:
genotype
- the genotype- Returns:
true
if the predicate is satisfied
-
getClazz
public Class<? extends Genotype> getClazz()
Returns the genotype class for the operator.- Returns:
- the genotype class
-
-