Utility library for Java application
Fork source code to get more detail or just adding maven dependency for usage.
Add below dependency to your maven project
<dependency>
<groupId>com.github.hoantran-it.library</groupId>
<artifactId>utility-library</artifactId>
<version>1.0</version>
</dependency>
Call api to sort a list object base on property field
import com.github.hoantran.lib.utility.comparison.CustomComparator;
import com.github.hoantran.lib.utility.sampledata.Developer;
import com.github.hoantran.lib.utility.sampledata.SampleDataCreation;
List<Developer> devList = SampleDataCreation.createDeveloperList();
Object[] propertyId = new Object[] { "name", "experienceYears" };
boolean[] ascending = new boolean[] { false, false };
Collections.sort(devList, new CustomComparator(propertyId, ascending));
- Maven - Dependency Management
For the versions available, see the maven repository or github release
- Hoan Tran - Initial work - hoantran-it
See also the list of contributors who participated in this project.
This project is licensed under the Apache License - see the LICENSE.md file for details