| Modifier and Type | Field and Description |
|---|---|
| private static NumberComparator |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected static char | |
| public int | compare(Number
the first object to be compared. o1, Number the second object to be compared. o2)Implements java. Compares its two arguments for order. |
| protected int | |
| public static NumberComparator |
| instance | back to summary |
|---|---|
| private static NumberComparator instance | |
| NumberComparator | back to summary |
|---|---|
| private NumberComparator() | |
| charAt | back to summary |
|---|---|
| protected static char charAt(String s, int i) | |
| compare | back to summary |
|---|---|
| public int compare(Number o1, Number o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| compareRight | back to summary |
|---|---|
| protected int compareRight(String a, String b) | |
| getInstance | back to summary |
|---|---|
| public static NumberComparator getInstance() | |