public static class AbstractGenericOperator.OperatorClassPredicate extends java.lang.Object implements AbstractGenericOperator.OperatorPredicate
AbstractGenericOperator.OperatorClassPredicate
returns true
for a given
specific class.Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<? extends org.opt4j.core.Genotype> |
clazz |
Constructor and Description |
---|
OperatorClassPredicate(java.lang.Class<? extends org.opt4j.core.Genotype> clazz)
Creates a new
AbstractGenericOperator.OperatorClassPredicate for the given
Genotype class. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
evaluate(org.opt4j.core.Genotype genotype)
Checks whether a
Genotype satisfies the predicate. |
java.lang.Class<? extends org.opt4j.core.Genotype> |
getClazz()
Returns the genotype class for the operator.
|
int |
hashCode() |
java.lang.String |
toString() |
public OperatorClassPredicate(java.lang.Class<? extends org.opt4j.core.Genotype> clazz)
AbstractGenericOperator.OperatorClassPredicate
for the given
Genotype
class.clazz
- the class of the genotypepublic boolean evaluate(org.opt4j.core.Genotype genotype)
AbstractGenericOperator.OperatorPredicate
Genotype
satisfies the predicate.evaluate
in interface AbstractGenericOperator.OperatorPredicate
genotype
- the genotypetrue
if the predicate is satisfiedpublic java.lang.Class<? extends org.opt4j.core.Genotype> getClazz()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object