Brooklyn

brooklyn.util
[Java] Class NaturalOrderComparator

java.lang.Object
  brooklyn.util.NaturalOrderComparator
All Implemented Interfaces:
java.util.Comparator

public class NaturalOrderComparator

comparator which takes two strings and puts them in an order with special rules for numbers to be placed in numeric order; e.g. "10">"9", including when those numbers occur in the midst of equal text; e.g. "a10" > "a9"; but not if the text differs; e.g. "a10" < "b9"

class is thread-safe


Method Summary
int compare(java.lang.String a, java.lang.String b)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

compare

public int compare(java.lang.String a, java.lang.String b)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.