org.unlaxer.util.collection.Comparators Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of japanese-address-parser Show documentation
Show all versions of japanese-address-parser Show documentation
a simplejapanese address parser
The newest version!
package org.unlaxer.util.collection;
import java.util.Comparator;
public class Comparators {
public static final Comparator longerIsFirst = (x,y)->{
int diff = y.length() - x.length();
if(diff !=0) {
return diff;
}
return y.compareTo(x);
};
public static final Comparator shoterIsFirst = (y,x)->{
int diff = y.length() - x.length();
if(diff !=0) {
return diff;
}
return y.compareTo(x);
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy