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 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

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)