@@ -11,21 +11,21 @@ public final class MoreNumberTypes {
11
11
public static final NumberType <Character > CHARACTER = new CharacterNumberType ();
12
12
13
13
public static final NumberType <AtomicInteger > ATOMIC_INTEGER =
14
- new AtomicNumberType <>(AtomicInteger .class , StandardNumberType . INTEGER , AtomicInteger ::new );
14
+ new AtomicNumberType <>(AtomicInteger .class , StandardNumberTypeEnum . T_INTEGER , AtomicInteger ::new );
15
15
16
16
public static final NumberType <AtomicLong > ATOMIC_LONG =
17
- new AtomicNumberType <>(AtomicLong .class , StandardNumberType . LONG , AtomicLong ::new );
17
+ new AtomicNumberType <>(AtomicLong .class , StandardNumberTypeEnum . T_LONG , AtomicLong ::new );
18
18
19
19
private MoreNumberTypes () {
20
20
}
21
21
22
22
private static final class AtomicNumberType <B extends Number , A extends Number > implements NumberType <A > {
23
23
24
24
private final Class <A > type ;
25
- private final StandardNumberType <B > baseType ;
25
+ private final NumberType <B > baseType ;
26
26
private final Function <B , A > toAtomicFn ;
27
27
28
- AtomicNumberType (Class <A > type , StandardNumberType <B > baseType , Function <B , A > toAtomicFn ) {
28
+ AtomicNumberType (Class <A > type , NumberType <B > baseType , Function <B , A > toAtomicFn ) {
29
29
this .type = type ;
30
30
this .baseType = baseType ;
31
31
this .toAtomicFn = toAtomicFn ;
@@ -82,9 +82,9 @@ public Character convertUnsafe(Number number) {
82
82
83
83
@ Override
84
84
public ValueRangeComparison compareToValueRange (Number number ) {
85
- ValueRangeComparison rangeComparison = StandardNumberType . INTEGER .compareToValueRange (number );
85
+ ValueRangeComparison rangeComparison = StandardNumberTypeEnum . T_INTEGER .compareToValueRange (number );
86
86
if (rangeComparison == ValueRangeComparison .WITHIN_RANGE ) {
87
- int intValue = StandardNumberType . INTEGER .convertUnsafe (number );
87
+ int intValue = StandardNumberTypeEnum . T_INTEGER .convertUnsafe (number );
88
88
if (intValue > maxValue ) {
89
89
return ValueRangeComparison .ABOVE_MAXIMUM ;
90
90
} else if (intValue < minValue ) {
@@ -96,7 +96,7 @@ public ValueRangeComparison compareToValueRange(Number number) {
96
96
97
97
@ Override
98
98
public Character convertToBounds (Number number ) {
99
- int result = StandardNumberType . INTEGER .convertToBounds (number );
99
+ int result = StandardNumberTypeEnum . T_INTEGER .convertToBounds (number );
100
100
if (result > maxValue ) {
101
101
return maxValue ;
102
102
} else if (result < minValue ) {
0 commit comments