T
- is the type of the language that the ASPIC theory's rules range overpublic class RuleComparator<T extends Invertable> extends java.lang.Object implements java.util.Comparator<InferenceRule<T>>
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
rules
The name of the rules ordered by size ascending
|
Constructor and Description |
---|
RuleComparator(java.util.List<java.lang.String> rules)
Constructs a new comparator for rules
|
Modifier and Type | Method and Description |
---|---|
int |
compare(InferenceRule<T> o1,
InferenceRule<T> o2) |
private java.util.List<java.lang.String> rules
public RuleComparator(java.util.List<java.lang.String> rules)
rules
- rules in ascending orderpublic int compare(InferenceRule<T> o1, InferenceRule<T> o2)
compare
in interface java.util.Comparator<InferenceRule<T extends Invertable>>