Package net.bytebuddy.implementation
Class EqualsMethod.CompoundComparator
- java.lang.Object
-
- net.bytebuddy.implementation.EqualsMethod.CompoundComparator
-
- All Implemented Interfaces:
Comparator<FieldDescription.InDefinedShape>
- Enclosing class:
- EqualsMethod
@Enhance protected static class EqualsMethod.CompoundComparator extends Object implements Comparator<FieldDescription.InDefinedShape>
A compound comparator that compares the values of multiple fields.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompoundComparator(Comparator<? super FieldDescription.InDefinedShape>... comparator)
Creates a compound comparator.protected
CompoundComparator(List<? extends Comparator<? super FieldDescription.InDefinedShape>> comparators)
Creates a compound comparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(FieldDescription.InDefinedShape left, FieldDescription.InDefinedShape right)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
CompoundComparator
protected CompoundComparator(Comparator<? super FieldDescription.InDefinedShape>... comparator)
Creates a compound comparator.- Parameters:
comparator
- All comparators to be applied in the application order.
-
CompoundComparator
protected CompoundComparator(List<? extends Comparator<? super FieldDescription.InDefinedShape>> comparators)
Creates a compound comparator.- Parameters:
comparators
- All comparators to be applied in the application order.
-
-
Method Detail
-
compare
public int compare(FieldDescription.InDefinedShape left, FieldDescription.InDefinedShape right)
- Specified by:
compare
in interfaceComparator<FieldDescription.InDefinedShape>
-
-