Class AlphanumCharComparator

java.lang.Object
com.pnfsoftware.jeb.util.format.AlphanumCharComparator
All Implemented Interfaces:
Comparator<Character>

public class AlphanumCharComparator extends Object implements Comparator<Character>
A character comparator that sort strings using a specific order.

The sorting order is as follows:

  • Special characters
  • Number characters
  • Alphabetic characters (note: accented character are sorted after the non-accented representation)
  • Constructor Details

    • AlphanumCharComparator

      public AlphanumCharComparator()
      Create a case-sensitive comparator.
    • AlphanumCharComparator

      public AlphanumCharComparator(boolean caseSensitive)
      Create a comparator.
      Parameters:
      caseSensitive - if true, upper-case letters will be sorted before lower-case
  • Method Details