Class Classifier
- java.lang.Object
-
- org.opennms.netmgt.flows.classification.internal.decision.Classifier
-
- All Implemented Interfaces:
Comparable<Classifier>
public class Classifier extends Object implements Comparable<Classifier>
Classifies classification requests.Classifiers are stored in leaf nodes of classification decision trees. They are derived from
RuleDefinition
s. They contain a couple ofMatcher
s that are checked during classification. The matchers may do a simplified test because some of their rule's conditions may already have been covered by thresholds along the path through the decision tree. Classifiers have the same sort ordered as their underlying rules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Classifier.Result
-
Field Summary
Fields Modifier and Type Field Description int
groupPosition
Matcher[]
matchers
int
position
Classifier.Result
result
-
Constructor Summary
Constructors Constructor Description Classifier(Matcher[] matchers, Classifier.Result result, int groupPosition, int position)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Classifier.Result
classify(ClassificationRequest request)
int
compareTo(Classifier o)
static Classifier
of(PreprocessedRule rule, FilterService filterService, Bounds bounds)
Constructs a classifier for a rule simplifying its conditions corresponding to the given bounds.String
toString()
-
-
-
Field Detail
-
matchers
public final Matcher[] matchers
-
result
public final Classifier.Result result
-
groupPosition
public final int groupPosition
-
position
public final int position
-
-
Constructor Detail
-
Classifier
public Classifier(Matcher[] matchers, Classifier.Result result, int groupPosition, int position)
-
-
Method Detail
-
of
public static Classifier of(PreprocessedRule rule, FilterService filterService, Bounds bounds)
Constructs a classifier for a rule simplifying its conditions corresponding to the given bounds.
-
classify
public Classifier.Result classify(ClassificationRequest request)
-
compareTo
public int compareTo(Classifier o)
- Specified by:
compareTo
in interfaceComparable<Classifier>
-
-