com.github.hoantran.lib.utility.comparison.CustomComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utility-library Show documentation
Show all versions of utility-library Show documentation
Utility library for JAVA application
/**
* Created by Hoan Tran @ http://hoantran-it.blogspot.com
*
* Any modifications to this file must keep this entire header intact.
*
*/
package com.github.hoantran.lib.utility.comparison;
import java.lang.reflect.Field;
import java.util.Comparator;
/**
* Custom comparator inherit from Comparator. It can be used to sort with multiple field of object.
* Easy to extend: all we need to to is extend this class and override getPropertyValue method
* Default behaviour of getPropertyValue method: get field of object based on field name.
*
* @author HoanTran
*/
public class CustomComparator implements Comparator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy