# Class: com.pnfsoftware.jeb.util.format.NumberComparator

A comparator of numbers encoded as strings. The input string is divided into chunks of numbers \(hexadecimal upper case supported\) and other characters. Comparison of characters is delegated to a [Character](Character) [Comparator](Comparator).

## Constructor: NumberComparator

Description: Create a comparator using the default character order and hexadecimal number scanning.

## Constructor: NumberComparator
- parameter: `charComparator`, type: `java.util.Comparator<java.lang.Character>`
- parameter: `scanHexadecimal`, type: `boolean`

Description: Create a comparator.
parameter: charComparator: optional comparator used for non\-numeric character chunks
parameter: scanHexadecimal: true to recognize hexadecimal chunks in addition to decimal chunks

## Method: compare
- parameter: `s1`, type: `java.lang.String`
- parameter: `s2`, type: `java.lang.String`
- return type: `int`


