DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

add ComparisonChain#compare(String,String,Collator) #1427

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Would be useful for Locale-aware comparisons.

@Override public ComparisonChain compare(String left, String right, Collator 
collator) {
      return classify(collator.compare(left, right));
}

Original issue reported on code.google.com by sebastia...@gmail.com on 24 May 2013 at 11:22

GoogleCodeExporter commented 9 years ago
Double-check me on this, but I think Collator implements Comparator. (Unless 
I'm confusing the JDK one with the ICU one?) If it does, you can use 
compare(T,T, Comparator<T>).

http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect
/ComparisonChain.html#compare%28T,%20T,%20java.util.Comparator%29

Original comment by cpov...@google.com on 24 May 2013 at 2:06

GoogleCodeExporter commented 9 years ago
D'oh!

Please close/delete issue, thanks.

Original comment by sebastia...@gmail.com on 24 May 2013 at 2:12

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 24 May 2013 at 2:19

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08