public class


extends Object
implements Comparator<T>
   ↳ com.pnfsoftware.jeb.util.format.AlphanumCharComparator

Class Overview

A character comparator that sort strings using the following order:

  • Special Characters ()[].,;/_ etc
  • Numbers 0-9
  • Alphabetic characters: AÀÁBC... When accentuated character is detected, it is sorted after its non accentuated character


Public Constructors
Create a case-sensitive comparator.
AlphanumCharComparator(boolean caseSensitive)
Create a comparator.
Public Methods
int compare(Character o1, Character o2)
Inherited Methods
From class java.lang.Object
From interface java.util.Comparator

Public Constructors

public AlphanumCharComparator ()

Create a case-sensitive comparator.

public AlphanumCharComparator (boolean caseSensitive)

Create a comparator.

caseSensitive if true, upper-case letters will be sorted before lower-case

Public Methods

public int compare (Character o1, Character o2)