- All Implemented Interfaces:
- java.util.Comparator<java.lang.String>
public class FastStringComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>
This is a more efficient implementation of a String comparator. While the
comparison order is stable, there is no guarantee that is is lexicographic.
The additional speed is gained by using the hash code as primary comparison
attribute. As the hash code is cached by the string object, its access is
very cheap even for long strings.
- Author:
- hummelb