Class ReverseOrderStrategy
- java.lang.Object
-
- org.eclipse.yasson.internal.model.customization.ordering.PropOrderStrategy
-
- org.eclipse.yasson.internal.model.customization.ordering.ReverseOrderStrategy
-
- All Implemented Interfaces:
Comparator<PropertyModel>
public class ReverseOrderStrategy extends PropOrderStrategy implements Comparator<PropertyModel>
Revers ordering strategy- Author:
- David Kral
-
-
Constructor Summary
Constructors Constructor Description ReverseOrderStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(PropertyModel object1, PropertyModel object2)
List<PropertyModel>
sortProperties(Collection<PropertyModel> properties)
Sorts properties-
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
-
-
-
-
Method Detail
-
sortProperties
public List<PropertyModel> sortProperties(Collection<PropertyModel> properties)
Description copied from class:PropOrderStrategy
Sorts properties- Specified by:
sortProperties
in classPropOrderStrategy
- Parameters:
properties
- properties for ordering- Returns:
- sorted List of properties
-
compare
public int compare(PropertyModel object1, PropertyModel object2)
- Specified by:
compare
in interfaceComparator<PropertyModel>
-
-