The guava-libraries have a class Ordering
. I'm wondering if it's thread safe.
For example, can it be used as a static variable?
public static Ordering<String> BY_LENGTH_ORDERING = new Ordering<String>() {
public int compare(String left, String right) {
return Ints.compare(left.length(), right.length());
}
};