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