Class Classification
- java.lang.Object
-
- de.cuioss.test.generator.internal.net.java.quickcheck.characteristic.Classification
-
public class Classification extends Object
Gather frequency information about test values.Classifications are used to categories test cases. WhileCharacteristic.specify(Object)is executed characteristic instances can add classifications withdoClassify(boolean, Object). For each execution ofCharacteristic.specify(Object)call()has to be executed once.
-
-
Constructor Summary
Constructors Constructor Description Classification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcall()Count the number of calls.voidclassifyCall(boolean predicate, Object classification)voidclassifyCall(Object classification)voiddoClassify(boolean predicate, Object classification)Increment the classification counter for the given classification.voiddoClassify(Object classification)List<Object>getCategories()Get a list of known categories.doublegetFrequency(Object classification)Get the frequency of the given category.StringtoString()
-
-
-
Constructor Detail
-
Classification
public Classification()
-
-
Method Detail
-
getFrequency
public double getFrequency(Object classification)
Get the frequency of the given category.- Returns:
- per cent of test cases with this classification.
-
getCategories
public List<Object> getCategories()
Get a list of known categories. Categories are sorted in descending frequency.
-
doClassify
public void doClassify(Object classification)
-
doClassify
public void doClassify(boolean predicate, Object classification)
Increment the classification counter for the given classification.- Parameters:
predicate- increment only if the predicate is true.classification- classification key
-
call
public void call()
Count the number of calls.
-
classifyCall
public void classifyCall(boolean predicate, Object classification)
-
classifyCall
public void classifyCall(Object classification)
-
-