2 * Copyright (C) 2014, United States Government, as represented by the
3 * Administrator of the National Aeronautics and Space Administration.
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
10 * http://www.apache.org/licenses/LICENSE-2.0.
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.
21 public abstract class NumberFormat extends Format {
23 static final int INTEGER_STYLE=0;
24 static final int NUMBER_STYLE=1;
26 public static NumberFormat getIntegerInstance() {
27 return new DecimalFormat(INTEGER_STYLE);
30 public static NumberFormat getNumberInstance() {
31 return new DecimalFormat(NUMBER_STYLE);
34 public static NumberFormat getInstance() {
35 return new DecimalFormat(NUMBER_STYLE);
38 public void setMaximumFractionDigits (int newValue){
39 // intercepted by native peer
41 public void setMaximumIntegerDigits (int newValue){
42 // intercepted by native peer
44 public void setMinimumFractionDigits(int newValue){
45 // intercepted by native peer
47 public void setMinimumIntegerDigits(int newValue){
48 // intercepted by native peer
51 public String format (long number) {
52 // intercepted by native peer
56 public String format (double d) {
57 // intercepted by native peer
62 public final Object parseObject (String source, ParsePosition pos) {
63 return parse(source,pos);
66 public void setParseIntegerOnly(boolean value) {
67 // intercepted by native peer
70 public boolean isParseIntegerOnly() {
71 // intercepted by native peer
75 public boolean isGroupingUsed() {
79 public void setGroupingUsed(boolean newValue) {
80 // intercepted by native peer
83 public abstract Number parse(String source,ParsePosition pos);
85 // ..and probably a lot missing