public class

AlphanumCharComparator

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

Class Overview

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)

Summary

Public Constructors
AlphanumCharComparator()
Create a case-sensitive comparator.
AlphanumCharComparator(boolean caseSensitive)
Create a comparator.
Public Methods
int compare(Character o1, Character o2)
[Expand]
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.

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

Public Methods

public int compare (Character o1, Character o2)