1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.jdo.impl.model.java;
19
20 /***
21 * A IntegralType instance represents an integral type as defined in the
22 * Java language. There are five are integral types: <code>byte</code>,
23 * <code>short</code>, <code>int</code>, <code>long</code>, and
24 * <code>char</code>.
25 * <p>
26 * Class PredefinedType provides public static final variables referring
27 * to the JavaType representation for integral types.
28 *
29 * @see PredefinedType#byteType
30 * @see PredefinedType#shortType
31 * @see PredefinedType#intType
32 * @see PredefinedType#longType
33 * @see PredefinedType#charType
34 *
35 * @author Michael Bouschen
36 * @since JDO 1.0.1
37 */
38 public class IntegralType
39 extends PrimitiveType
40 {
41 /*** Constructor. */
42 public IntegralType(Class clazz)
43 {
44 super(clazz);
45 }
46
47 /***
48 * Returns <code>true</code> if this JavaType represents an integral
49 * type.
50 * @return <code>true</code> if this JavaTypre represents an integral
51 * type; <code>false</code> otherwise.
52 */
53 public boolean isIntegral()
54 {
55 return true;
56 }
57
58 /***
59 * Returns <code>true</code> if this JavaType represents an orderable
60 * type as specified by JDO.
61 * @return <code>true</code> if this JavaType represents an orderable
62 * type; <code>false</code> otherwise.
63 */
64 public boolean isOrderable()
65 {
66 return true;
67 }
68 }