1 /* Copyright 2002-2025 CS GROUP
2 * Licensed to CS GROUP (CS) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * CS 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 package org.orekit.utils.units;
18
19 /** Multiplicative prefixes.
20 * @author Luc Maisonobe
21 * @since 11.0
22 */
23 enum Prefix {
24
25 /** Septillion. */
26 YOTTA("Y", 1.0e24),
27
28 /** Sextillion. */
29 ZETTA("Z", 1.0e21),
30
31 /** Quintillion. */
32 EXA("E", 1.0e18),
33
34 /** Quadrillion. */
35 PETA("P", 1.0e15),
36
37 /** Trillion. */
38 TERA("T", 1.0e12),
39
40 /** Billion. */
41 GIGA("G", 1.0e9),
42
43 /** Million. */
44 MEGA("M", 1.0e6),
45
46 /** Thousand. */
47 KILO("k", 1.0e3),
48
49 /** Hundred. */
50 HECTO("h", 1.0e2),
51
52 /** Ten. */
53 DECA("da", 1.0e1),
54
55 /** Tenth. */
56 DECI("d", 1.0e-1),
57
58 /** Hundredth. */
59 CENTI("c", 1.0e-2),
60
61 /** Thousandth. */
62 MILLI("m", 1.0e-3),
63
64 /** Millionth.
65 * <p>
66 * The symbol used here is the standard SI one: µ (U+00B5, MICRO SIGN)
67 * </p>
68 */
69 MICRO("µ", 1.0e-6),
70
71 /** Millionth.
72 * <p>
73 * The symbol used here is an alternate one: μ (U+03BC, GREEK SMALL LETTER MU)
74 * </p>
75 */
76 MICRO_ALTERNATE("μ", 1.0e-6),
77
78 /** Billionth. */
79 NANO("n", 1.0e-9),
80
81 /** Trillionth. */
82 PICO("p", 1.0e-12),
83
84 /** Quadrillionth. */
85 FEMTO("f", 1.0e-15),
86
87 /** Quintillionth. */
88 ATTO("a", 1.0e-18),
89
90 /** Sextillionth. */
91 ZEPTO("z", 1.0e-21),
92
93 /** Septillionth. */
94 YOCTO("y", 1.0e-24);
95
96 /** Symbol. */
97 private String symbol;
98
99 /** Multiplication factor. */
100 private double factor;
101
102 /** Simple constructor.
103 * @param symbol symbol
104 * @param factor multiplication factor
105 */
106 Prefix(final String symbol, final double factor) {
107 this.symbol = symbol;
108 this.factor = factor;
109 }
110
111 /** Get the prefix symbol.
112 * @return prefix symbol
113 */
114 public String getSymbol() {
115 return symbol;
116 }
117
118 /** Get the prefix multiplication factor.
119 * @return prefix multiplication factor
120 */
121 public double getFactor() {
122 return factor;
123 }
124
125 }