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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<Comparator<? super FieldDescription.InDefinedShape>>
All comparators to be applied in the application order. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionint
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
-
Field Details
-
comparators
All comparators to be applied in the application order.
-
-
Constructor Details
-
CompoundComparator
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 Details
-
compare
- Specified by:
compare
in interfaceComparator<FieldDescription.InDefinedShape>
-