1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.seasar.cubby.converter.impl;
18
19 import java.math.BigInteger;
20
21
22
23
24
25
26 public class LongConverter extends AbstractIntegerNumberConverter {
27
28
29 private static final BigInteger MIN_VALUE = BigInteger
30 .valueOf(Long.MIN_VALUE);
31
32
33 private static final BigInteger MAX_VALUE = BigInteger
34 .valueOf(Long.MAX_VALUE);
35
36
37
38
39 public Class<?> getObjectType() {
40 return Long.class;
41 }
42
43
44
45
46 @Override
47 protected Number convert(final BigInteger integer) {
48 return Long.valueOf(integer.longValue());
49 }
50
51
52
53
54 @Override
55 protected BigInteger getMinValue() {
56 return MIN_VALUE;
57 }
58
59
60
61
62 @Override
63 protected BigInteger getMaxValue() {
64 return MAX_VALUE;
65 }
66
67 }