View Javadoc

1   /*
2    * Copyright 2005 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at 
7    * 
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software 
11   * distributed under the License is distributed on an "AS IS" BASIS, 
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13   * See the License for the specific language governing permissions and 
14   * limitations under the License.
15   */
16  
17  package org.apache.jdo.impl.model.java;
18  
19  /***
20   * A FloatingPointType instance represents a floating point type as defined
21   * in the Java language. There are two floating point types: 
22   * <code>float</code> and <code>double</code>.
23   * <p>
24   * Class PredefinedType provides public static final variables referring
25   * to the JavaType representation for floating point types.
26   * 
27   * @see PredefinedType#floatType
28   * @see PredefinedType#doubleType
29   *
30   * @author Michael Bouschen
31   * @since JDO 1.0.1
32   */
33  public class FloatingPointType
34      extends PrimitiveType 
35  {
36      /*** Constructor. */
37      public FloatingPointType(Class clazz)
38      {
39          super(clazz);
40      }
41  
42      /*** 
43       * Returns <code>true</code> if this JavaType represents a floating
44       * point type. 
45       * @return <code>true</code> if this JavaType represents a floating
46       * point type; <code>false</code> otherwise.
47       */
48      public boolean isFloatingPoint() 
49      {
50          return true;
51      }
52  
53      /***
54       * Returns <code>true</code> if this JavaType represents an orderable
55       * type as specified by JDO.
56       * @return <code>true</code> if this JavaType represents an orderable
57       * type; <code>false</code> otherwise.
58       */
59      public boolean isOrderable() 
60      {
61          return true;
62      }
63  }