View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.commons.math4.legacy.core.dfp;
19  
20  public class Decimal10 extends DfpDec {
21  
22      Decimal10(final DfpField factory) {
23          super(factory);
24      }
25  
26      Decimal10(final DfpField factory, final byte x) {
27          super(factory, x);
28      }
29  
30      Decimal10(final DfpField factory, final int x) {
31          super(factory, x);
32      }
33  
34      Decimal10(final DfpField factory, final long x) {
35          super(factory, x);
36      }
37  
38      Decimal10(final DfpField factory, final double x) {
39          super(factory, x);
40      }
41  
42      public Decimal10(final Dfp d) {
43          super(d);
44      }
45  
46      public Decimal10(final DfpField factory, final String s) {
47          super(factory, s);
48      }
49  
50      protected Decimal10(final DfpField factory, final byte sign, final byte nans) {
51          super(factory, sign, nans);
52      }
53  
54      @Override
55      public Dfp newInstance() {
56          return new Decimal10(getField());
57      }
58  
59      @Override
60      public Dfp newInstance(final byte x) {
61          return new Decimal10(getField(), x);
62      }
63  
64      @Override
65      public Dfp newInstance(final int x) {
66          return new Decimal10(getField(), x);
67      }
68  
69      @Override
70      public Dfp newInstance(final long x) {
71          return new Decimal10(getField(), x);
72      }
73  
74      @Override
75      public Dfp newInstance(final double x) {
76          return new Decimal10(getField(), x);
77      }
78  
79      @Override
80      public Dfp newInstance(final Dfp d) {
81          return new Decimal10(d);
82      }
83  
84      @Override
85      public Dfp newInstance(final String s) {
86          return new Decimal10(getField(), s);
87      }
88  
89      @Override
90      public Dfp newInstance(final byte sign, final byte nans) {
91          return new Decimal10(getField(), sign, nans);
92      }
93  
94      @Override
95      protected int getDecimalDigits() {
96          return 10;
97      }
98  }