1848723e835f244d15bc1ea86fc9460ded0d44bb
[jpf-core.git] / src / classes / java / text / NumberFormat.java
1 /*
2  * Copyright (C) 2014, United States Government, as represented by the
3  * Administrator of the National Aeronautics and Space Administration.
4  * All rights reserved.
5  *
6  * The Java Pathfinder core (jpf-core) platform is licensed under the
7  * Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  * 
10  *        http://www.apache.org/licenses/LICENSE-2.0. 
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and 
16  * limitations under the License.
17  */
18
19 package java.text;
20
21 public abstract class NumberFormat extends Format {
22
23   static final int INTEGER_STYLE=0;
24   static final int NUMBER_STYLE=1;
25     
26   public static NumberFormat getIntegerInstance() {
27     return new DecimalFormat(INTEGER_STYLE);
28   }
29   
30   public static NumberFormat getNumberInstance() {
31     return new DecimalFormat(NUMBER_STYLE);
32   }
33
34   public static NumberFormat getInstance() {
35     return new DecimalFormat(NUMBER_STYLE);
36   }
37   
38   public void setMaximumFractionDigits (int newValue){
39     // intercepted by native peer
40   }
41   public void setMaximumIntegerDigits (int newValue){
42     // intercepted by native peer
43   }
44   public void setMinimumFractionDigits(int newValue){
45     // intercepted by native peer
46   }
47   public void setMinimumIntegerDigits(int newValue){
48     // intercepted by native peer
49   }
50   
51   public String format (long number) {
52     // intercepted by native peer
53     return null;
54   }
55   
56   public String format (double d) {
57     // intercepted by native peer
58     return null;
59   }
60
61   @Override
62   public final Object parseObject (String source, ParsePosition pos) {
63     return parse(source,pos);
64   }
65
66   public void setParseIntegerOnly(boolean value) {
67       // intercepted by native peer
68   }
69
70   public boolean isParseIntegerOnly() {
71       // intercepted by native peer
72       return false;
73   }
74
75   public boolean isGroupingUsed() {
76       return false;
77   }
78
79   public void setGroupingUsed(boolean newValue) {
80     // intercepted by native peer
81   }
82
83   public abstract Number parse(String source,ParsePosition pos);
84
85   // ..and probably a lot missing
86   
87 }