Class DegreeComparator
java.lang.Object
org.tweetyproject.arg.adf.reasoner.heuristics.DegreeComparator
- All Implemented Interfaces:
Comparator<Argument>
@Deprecated(forRemoval=true)
public final class DegreeComparator
extends Object
implements Comparator<Argument>
Deprecated, for removal: This API element is subject to removal in a future version.
This class is no longer used and will be removed in a future version.
A comparator for comparing arguments in an Abstract Dialectical Framework (ADF) based on their degree.
The degree can be based on incoming, outgoing, or undirected links in the framework.
This class is deprecated and should not be used anymore.
- Author:
- Mathias Hofer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated, for removal: This API element is subject to removal in a future version.An enumeration for the type of degree to be used in comparisons. -
Constructor Summary
ConstructorDescriptionDegreeComparator
(AbstractDialecticalFramework adf, DegreeComparator.DegreeType degreeType) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a newDegreeComparator
with the specified ADF and degree type. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
DegreeComparator
Deprecated, for removal: This API element is subject to removal in a future version.Constructs a newDegreeComparator
with the specified ADF and degree type.- Parameters:
adf
- the Abstract Dialectical Framework (ADF) to be used for calculating degreesdegreeType
- the type of degree to be used for comparison (e.g., INCOMING, OUTGOING, or UNDIRECTED)- Throws:
NullPointerException
- if eitheradf
ordegreeType
isnull
-
-
Method Details
-
compare
Deprecated, for removal: This API element is subject to removal in a future version.Compares two arguments in the ADF based on their degree. The degree type (incoming, outgoing, or undirected) is specified at the time of the comparator's construction.- Specified by:
compare
in interfaceComparator<Argument>
- Parameters:
a1
- the first argument to comparea2
- the second argument to compare- Returns:
- a negative integer, zero, or a positive integer as the degree of
a1
is less than, equal to, or greater than the degree ofa2
-