@sitevision/api 2023.2.2-beta.1 → 2023.2.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/java/io/File/index.d.ts +0 -120
- package/types/java/io/File/index.js +0 -2
- package/types/java/lang/Boolean/index.d.ts +0 -123
- package/types/java/lang/Boolean/index.js +1 -8
- package/types/java/lang/Class/index.d.ts +2 -93
- package/types/java/lang/Class/index.js +0 -1
- package/types/java/lang/ClassLoader/index.d.ts +0 -91
- package/types/java/lang/ClassLoader/index.js +0 -5
- package/types/java/lang/Double/index.d.ts +0 -541
- package/types/java/lang/Double/index.js +2 -13
- package/types/java/lang/Enum/index.d.ts +0 -23
- package/types/java/lang/Enum/index.js +0 -1
- package/types/java/lang/Float/index.d.ts +0 -494
- package/types/java/lang/Float/index.js +2 -13
- package/types/java/lang/Integer/index.d.ts +0 -780
- package/types/java/lang/Integer/index.js +2 -29
- package/types/java/lang/Long/index.d.ts +0 -788
- package/types/java/lang/Long/index.js +2 -28
- package/types/java/lang/Package/index.d.ts +0 -28
- package/types/java/lang/Package/index.js +0 -2
- package/types/java/lang/String/index.d.ts +0 -193
- package/types/java/lang/String/index.js +0 -4
- package/types/java/lang/reflect/AccessibleObject/index.d.ts +0 -25
- package/types/java/math/BigDecimal/index.d.ts +1 -40
- package/types/java/math/BigDecimal/index.js +0 -1
- package/types/java/math/BigInteger/index.d.ts +0 -25
- package/types/java/math/BigInteger/index.js +0 -2
- package/types/java/net/InetAddress/index.d.ts +0 -134
- package/types/java/net/InetAddress/index.js +1 -6
- package/types/java/net/NetworkInterface/index.d.ts +0 -50
- package/types/java/net/NetworkInterface/index.js +0 -4
- package/types/java/net/URI/index.d.ts +0 -22
- package/types/java/net/URI/index.js +0 -1
- package/types/java/net/URL/index.d.ts +0 -23
- package/types/java/net/URL/index.js +1 -2
- package/types/java/net/URLConnection/index.d.ts +0 -125
- package/types/java/net/URLConnection/index.js +1 -10
- package/types/java/nio/channels/AsynchronousFileChannel/index.d.ts +0 -136
- package/types/java/nio/channels/AsynchronousFileChannel/index.js +0 -1
- package/types/java/nio/channels/FileChannel/index.d.ts +0 -128
- package/types/java/nio/channels/FileChannel/index.js +0 -1
- package/types/java/nio/charset/Charset/index.d.ts +1 -58
- package/types/java/nio/charset/Charset/index.js +0 -4
- package/types/java/nio/file/spi/FileSystemProvider/index.d.ts +0 -12
- package/types/java/nio/file/spi/FileSystemProvider/index.js +0 -1
- package/types/java/text/DateFormat/index.d.ts +0 -130
- package/types/java/text/DateFormat/index.js +0 -5
- package/types/java/text/DateFormatSymbols/index.d.ts +0 -45
- package/types/java/text/DateFormatSymbols/index.js +0 -2
- package/types/java/text/NumberFormat/index.d.ts +0 -123
- package/types/java/text/NumberFormat/index.js +0 -6
- package/types/java/time/Clock/index.d.ts +1 -162
- package/types/java/time/Clock/index.js +0 -8
- package/types/java/time/Duration/index.d.ts +3 -193
- package/types/java/time/Duration/index.js +0 -10
- package/types/java/time/Instant/index.d.ts +0 -101
- package/types/java/time/Instant/index.js +0 -5
- package/types/java/time/LocalDate/index.d.ts +4 -134
- package/types/java/time/LocalDate/index.js +0 -6
- package/types/java/time/LocalDateTime/index.d.ts +7 -285
- package/types/java/time/LocalDateTime/index.js +0 -6
- package/types/java/time/LocalTime/index.d.ts +2 -146
- package/types/java/time/LocalTime/index.js +0 -6
- package/types/java/time/OffsetDateTime/index.d.ts +7 -177
- package/types/java/time/OffsetDateTime/index.js +0 -6
- package/types/java/time/OffsetTime/index.d.ts +3 -141
- package/types/java/time/OffsetTime/index.js +0 -5
- package/types/java/time/Period/index.d.ts +1 -135
- package/types/java/time/Period/index.js +0 -8
- package/types/java/time/ZoneId/index.d.ts +1 -121
- package/types/java/time/ZoneId/index.js +0 -5
- package/types/java/time/ZoneOffset/index.d.ts +1 -104
- package/types/java/time/ZoneOffset/index.js +0 -6
- package/types/java/time/ZonedDateTime/index.d.ts +6 -284
- package/types/java/time/ZonedDateTime/index.js +0 -7
- package/types/java/time/format/DateTimeFormatter/index.d.ts +2 -215
- package/types/java/time/format/DateTimeFormatter/index.js +0 -6
- package/types/java/time/format/DecimalStyle/index.d.ts +0 -34
- package/types/java/time/format/DecimalStyle/index.js +0 -3
- package/types/java/time/temporal/ValueRange/index.d.ts +0 -43
- package/types/java/time/temporal/ValueRange/index.js +0 -1
- package/types/java/time/zone/ZoneOffsetTransition/index.d.ts +2 -19
- package/types/java/time/zone/ZoneOffsetTransition/index.js +0 -1
- package/types/java/time/zone/ZoneRules/index.d.ts +2 -28
- package/types/java/time/zone/ZoneRules/index.js +0 -1
- package/types/java/util/Calendar/index.d.ts +2 -67
- package/types/java/util/Calendar/index.js +0 -3
- package/types/java/util/Comparator/index.d.ts +16 -16
- package/types/java/util/Currency/index.d.ts +0 -38
- package/types/java/util/Currency/index.js +0 -2
- package/types/java/util/Date/index.d.ts +0 -160
- package/types/java/util/Date/index.js +0 -3
- package/types/java/util/Locale/index.d.ts +0 -344
- package/types/java/util/Locale/index.js +1 -11
- package/types/java/util/Optional/index.d.ts +0 -27
- package/types/java/util/Optional/index.js +0 -3
- package/types/java/util/OptionalDouble/index.d.ts +0 -15
- package/types/java/util/OptionalDouble/index.js +0 -2
- package/types/java/util/OptionalInt/index.d.ts +0 -15
- package/types/java/util/OptionalInt/index.js +0 -2
- package/types/java/util/OptionalLong/index.d.ts +0 -15
- package/types/java/util/OptionalLong/index.js +0 -2
- package/types/java/util/TimeZone/index.d.ts +0 -65
- package/types/java/util/TimeZone/index.js +0 -4
- package/types/javax/jcr/PropertyType/index.d.ts +2 -18
- package/types/javax/jcr/PropertyType/index.js +1 -4
- package/types/javax/jcr/version/OnParentVersionAction/index.d.ts +2 -19
- package/types/javax/jcr/version/OnParentVersionAction/index.js +1 -4
- package/types/java/net/ContentHandler/index.d.ts +0 -70
- package/types/java/net/ContentHandler/index.js +0 -10
- package/types/java/net/ContentHandlerFactory/index.d.ts +0 -26
- package/types/java/net/ContentHandlerFactory/index.js +0 -10
- package/types/java/net/FileNameMap/index.d.ts +0 -16
- package/types/java/net/FileNameMap/index.js +0 -10
- package/types/java/net/URLStreamHandler/index.d.ts +0 -199
- package/types/java/net/URLStreamHandler/index.js +0 -19
- package/types/java/net/URLStreamHandlerFactory/index.d.ts +0 -24
- package/types/java/net/URLStreamHandlerFactory/index.js +0 -10
- package/types/java/time/format/FormatStyle/index.d.ts +0 -14
- package/types/java/time/format/FormatStyle/index.js +0 -13
- package/types/java/util/Locale.Category/index.d.ts +0 -12
- package/types/java/util/Locale.Category/index.js +0 -11
- package/types/java/util/Locale.FilteringMode/index.d.ts +0 -97
- package/types/java/util/Locale.FilteringMode/index.js +0 -14
|
@@ -23,360 +23,6 @@ import type { Class } from "../Class";
|
|
|
23
23
|
*/
|
|
24
24
|
export type Double = Number &
|
|
25
25
|
Comparable & {
|
|
26
|
-
/**
|
|
27
|
-
* Returns a string representation of the {@code double}
|
|
28
|
-
* argument. All characters mentioned below are ASCII characters.
|
|
29
|
-
* <ul>
|
|
30
|
-
* <li>If the argument is NaN, the result is the string
|
|
31
|
-
* "{@code NaN}".
|
|
32
|
-
* <li>Otherwise, the result is a string that represents the sign and
|
|
33
|
-
* magnitude (absolute value) of the argument. If the sign is negative,
|
|
34
|
-
* the first character of the result is '{@code -}'
|
|
35
|
-
* ({@code '\u002D'}); if the sign is positive, no sign character
|
|
36
|
-
* appears in the result. As for the magnitude <i>m</i>:
|
|
37
|
-
* <ul>
|
|
38
|
-
* <li>If <i>m</i> is infinity, it is represented by the characters
|
|
39
|
-
* {@code "Infinity"}; thus, positive infinity produces the result
|
|
40
|
-
* {@code "Infinity"} and negative infinity produces the result
|
|
41
|
-
* {@code "-Infinity"}.
|
|
42
|
-
*
|
|
43
|
-
* <li>If <i>m</i> is zero, it is represented by the characters
|
|
44
|
-
* {@code "0.0"}; thus, negative zero produces the result
|
|
45
|
-
* {@code "-0.0"} and positive zero produces the result
|
|
46
|
-
* {@code "0.0"}.
|
|
47
|
-
*
|
|
48
|
-
* <li>If <i>m</i> is greater than or equal to 10<sup>-3</sup> but less
|
|
49
|
-
* than 10<sup>7</sup>, then it is represented as the integer part of
|
|
50
|
-
* <i>m</i>, in decimal form with no leading zeroes, followed by
|
|
51
|
-
* '{@code .}' ({@code '\u002E'}), followed by one or
|
|
52
|
-
* more decimal digits representing the fractional part of <i>m</i>.
|
|
53
|
-
*
|
|
54
|
-
* <li>If <i>m</i> is less than 10<sup>-3</sup> or greater than or
|
|
55
|
-
* equal to 10<sup>7</sup>, then it is represented in so-called
|
|
56
|
-
* "computerized scientific notation." Let <i>n</i> be the unique
|
|
57
|
-
* integer such that 10<sup><i>n</i></sup> ≤ <i>m</i> {@literal <}
|
|
58
|
-
* 10<sup><i>n</i>+1</sup>; then let <i>a</i> be the
|
|
59
|
-
* mathematically exact quotient of <i>m</i> and
|
|
60
|
-
* 10<sup><i>n</i></sup> so that 1 ≤ <i>a</i> {@literal <} 10. The
|
|
61
|
-
* magnitude is then represented as the integer part of <i>a</i>,
|
|
62
|
-
* as a single decimal digit, followed by '{@code .}'
|
|
63
|
-
* ({@code '\u002E'}), followed by decimal digits
|
|
64
|
-
* representing the fractional part of <i>a</i>, followed by the
|
|
65
|
-
* letter '{@code E}' ({@code '\u0045'}), followed
|
|
66
|
-
* by a representation of <i>n</i> as a decimal integer, as
|
|
67
|
-
* produced by the method {@link Integer#toString(int)}.
|
|
68
|
-
* </ul>
|
|
69
|
-
* </ul>
|
|
70
|
-
* How many digits must be printed for the fractional part of
|
|
71
|
-
* <i>m</i> or <i>a</i>? There must be at least one digit to represent
|
|
72
|
-
* the fractional part, and beyond that as many, but only as many, more
|
|
73
|
-
* digits as are needed to uniquely distinguish the argument value from
|
|
74
|
-
* adjacent values of type {@code double}. That is, suppose that
|
|
75
|
-
* <i>x</i> is the exact mathematical value represented by the decimal
|
|
76
|
-
* representation produced by this method for a finite nonzero argument
|
|
77
|
-
* <i>d</i>. Then <i>d</i> must be the {@code double} value nearest
|
|
78
|
-
* to <i>x</i>; or if two {@code double} values are equally close
|
|
79
|
-
* to <i>x</i>, then <i>d</i> must be one of them and the least
|
|
80
|
-
* significant bit of the significand of <i>d</i> must be {@code 0}.
|
|
81
|
-
*
|
|
82
|
-
* <p>To create localized string representations of a floating-point
|
|
83
|
-
* value, use subclasses of {@link java.text.NumberFormat}.
|
|
84
|
-
* @param d the {@code double} to be converted.
|
|
85
|
-
* @return a string representation of the argument.
|
|
86
|
-
*/
|
|
87
|
-
toString(d: number): string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Returns a hexadecimal string representation of the
|
|
91
|
-
* {@code double} argument. All characters mentioned below
|
|
92
|
-
* are ASCII characters.
|
|
93
|
-
*
|
|
94
|
-
* <ul>
|
|
95
|
-
* <li>If the argument is NaN, the result is the string
|
|
96
|
-
* "{@code NaN}".
|
|
97
|
-
* <li>Otherwise, the result is a string that represents the sign
|
|
98
|
-
* and magnitude of the argument. If the sign is negative, the
|
|
99
|
-
* first character of the result is '{@code -}'
|
|
100
|
-
* ({@code '\u002D'}); if the sign is positive, no sign
|
|
101
|
-
* character appears in the result. As for the magnitude <i>m</i>:
|
|
102
|
-
*
|
|
103
|
-
* <ul>
|
|
104
|
-
* <li>If <i>m</i> is infinity, it is represented by the string
|
|
105
|
-
* {@code "Infinity"}; thus, positive infinity produces the
|
|
106
|
-
* result {@code "Infinity"} and negative infinity produces
|
|
107
|
-
* the result {@code "-Infinity"}.
|
|
108
|
-
*
|
|
109
|
-
* <li>If <i>m</i> is zero, it is represented by the string
|
|
110
|
-
* {@code "0x0.0p0"}; thus, negative zero produces the result
|
|
111
|
-
* {@code "-0x0.0p0"} and positive zero produces the result
|
|
112
|
-
* {@code "0x0.0p0"}.
|
|
113
|
-
*
|
|
114
|
-
* <li>If <i>m</i> is a {@code double} value with a
|
|
115
|
-
* normalized representation, substrings are used to represent the
|
|
116
|
-
* significand and exponent fields. The significand is
|
|
117
|
-
* represented by the characters {@code "0x1."}
|
|
118
|
-
* followed by a lowercase hexadecimal representation of the rest
|
|
119
|
-
* of the significand as a fraction. Trailing zeros in the
|
|
120
|
-
* hexadecimal representation are removed unless all the digits
|
|
121
|
-
* are zero, in which case a single zero is used. Next, the
|
|
122
|
-
* exponent is represented by {@code "p"} followed
|
|
123
|
-
* by a decimal string of the unbiased exponent as if produced by
|
|
124
|
-
* a call to {@link Integer#toString(int) Integer.toString} on the
|
|
125
|
-
* exponent value.
|
|
126
|
-
*
|
|
127
|
-
* <li>If <i>m</i> is a {@code double} value with a subnormal
|
|
128
|
-
* representation, the significand is represented by the
|
|
129
|
-
* characters {@code "0x0."} followed by a
|
|
130
|
-
* hexadecimal representation of the rest of the significand as a
|
|
131
|
-
* fraction. Trailing zeros in the hexadecimal representation are
|
|
132
|
-
* removed. Next, the exponent is represented by
|
|
133
|
-
* {@code "p-1022"}. Note that there must be at
|
|
134
|
-
* least one nonzero digit in a subnormal significand.
|
|
135
|
-
*
|
|
136
|
-
* </ul>
|
|
137
|
-
*
|
|
138
|
-
* </ul>
|
|
139
|
-
*
|
|
140
|
-
* <table border>
|
|
141
|
-
* <caption>Examples</caption>
|
|
142
|
-
* <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
|
|
143
|
-
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
|
|
144
|
-
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td>
|
|
145
|
-
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
|
|
146
|
-
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
|
|
147
|
-
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
|
|
148
|
-
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td>
|
|
149
|
-
* <tr><td>{@code Double.MAX_VALUE}</td>
|
|
150
|
-
* <td>{@code 0x1.fffffffffffffp1023}</td>
|
|
151
|
-
* <tr><td>{@code Minimum Normal Value}</td>
|
|
152
|
-
* <td>{@code 0x1.0p-1022}</td>
|
|
153
|
-
* <tr><td>{@code Maximum Subnormal Value}</td>
|
|
154
|
-
* <td>{@code 0x0.fffffffffffffp-1022}</td>
|
|
155
|
-
* <tr><td>{@code Double.MIN_VALUE}</td>
|
|
156
|
-
* <td>{@code 0x0.0000000000001p-1022}</td>
|
|
157
|
-
* </table>
|
|
158
|
-
* @param d the {@code double} to be converted.
|
|
159
|
-
* @return a hex string representation of the argument.
|
|
160
|
-
* @since 1.5
|
|
161
|
-
* @author Joseph D. Darcy
|
|
162
|
-
*/
|
|
163
|
-
toHexString(d: number): string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Returns a {@code Double} object holding the
|
|
167
|
-
* {@code double} value represented by the argument string
|
|
168
|
-
* {@code s}.
|
|
169
|
-
*
|
|
170
|
-
* <p>If {@code s} is {@code null}, then a
|
|
171
|
-
* {@code NullPointerException} is thrown.
|
|
172
|
-
*
|
|
173
|
-
* <p>Leading and trailing whitespace characters in {@code s}
|
|
174
|
-
* are ignored. Whitespace is removed as if by the {@link
|
|
175
|
-
* String#trim} method; that is, both ASCII space and control
|
|
176
|
-
* characters are removed. The rest of {@code s} should
|
|
177
|
-
* constitute a <i>FloatValue</i> as described by the lexical
|
|
178
|
-
* syntax rules:
|
|
179
|
-
*
|
|
180
|
-
* <blockquote>
|
|
181
|
-
* <dl>
|
|
182
|
-
* <dt><i>FloatValue:</i>
|
|
183
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code NaN}
|
|
184
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code Infinity}
|
|
185
|
-
* <dd><i>Sign<sub>opt</sub> FloatingPointLiteral</i>
|
|
186
|
-
* <dd><i>Sign<sub>opt</sub> HexFloatingPointLiteral</i>
|
|
187
|
-
* <dd><i>SignedInteger</i>
|
|
188
|
-
* </dl>
|
|
189
|
-
*
|
|
190
|
-
* <dl>
|
|
191
|
-
* <dt><i>HexFloatingPointLiteral</i>:
|
|
192
|
-
* <dd> <i>HexSignificand BinaryExponent FloatTypeSuffix<sub>opt</sub></i>
|
|
193
|
-
* </dl>
|
|
194
|
-
*
|
|
195
|
-
* <dl>
|
|
196
|
-
* <dt><i>HexSignificand:</i>
|
|
197
|
-
* <dd><i>HexNumeral</i>
|
|
198
|
-
* <dd><i>HexNumeral</i> {@code .}
|
|
199
|
-
* <dd>{@code 0x} <i>HexDigits<sub>opt</sub>
|
|
200
|
-
* </i>{@code .}<i> HexDigits</i>
|
|
201
|
-
* <dd>{@code 0X}<i> HexDigits<sub>opt</sub>
|
|
202
|
-
* </i>{@code .} <i>HexDigits</i>
|
|
203
|
-
* </dl>
|
|
204
|
-
*
|
|
205
|
-
* <dl>
|
|
206
|
-
* <dt><i>BinaryExponent:</i>
|
|
207
|
-
* <dd><i>BinaryExponentIndicator SignedInteger</i>
|
|
208
|
-
* </dl>
|
|
209
|
-
*
|
|
210
|
-
* <dl>
|
|
211
|
-
* <dt><i>BinaryExponentIndicator:</i>
|
|
212
|
-
* <dd>{@code p}
|
|
213
|
-
* <dd>{@code P}
|
|
214
|
-
* </dl>
|
|
215
|
-
*
|
|
216
|
-
* </blockquote>
|
|
217
|
-
*
|
|
218
|
-
* where <i>Sign</i>, <i>FloatingPointLiteral</i>,
|
|
219
|
-
* <i>HexNumeral</i>, <i>HexDigits</i>, <i>SignedInteger</i> and
|
|
220
|
-
* <i>FloatTypeSuffix</i> are as defined in the lexical structure
|
|
221
|
-
* sections of
|
|
222
|
-
* <cite>The Java™ Language Specification</cite>,
|
|
223
|
-
* except that underscores are not accepted between digits.
|
|
224
|
-
* If {@code s} does not have the form of
|
|
225
|
-
* a <i>FloatValue</i>, then a {@code NumberFormatException}
|
|
226
|
-
* is thrown. Otherwise, {@code s} is regarded as
|
|
227
|
-
* representing an exact decimal value in the usual
|
|
228
|
-
* "computerized scientific notation" or as an exact
|
|
229
|
-
* hexadecimal value; this exact numerical value is then
|
|
230
|
-
* conceptually converted to an "infinitely precise"
|
|
231
|
-
* binary value that is then rounded to type {@code double}
|
|
232
|
-
* by the usual round-to-nearest rule of IEEE 754 floating-point
|
|
233
|
-
* arithmetic, which includes preserving the sign of a zero
|
|
234
|
-
* value.
|
|
235
|
-
*
|
|
236
|
-
* Note that the round-to-nearest rule also implies overflow and
|
|
237
|
-
* underflow behaviour; if the exact value of {@code s} is large
|
|
238
|
-
* enough in magnitude (greater than or equal to ({@link
|
|
239
|
-
* #MAX_VALUE} + {@link Math#ulp(double) ulp(MAX_VALUE)}/2),
|
|
240
|
-
* rounding to {@code double} will result in an infinity and if the
|
|
241
|
-
* exact value of {@code s} is small enough in magnitude (less
|
|
242
|
-
* than or equal to {@link #MIN_VALUE}/2), rounding to float will
|
|
243
|
-
* result in a zero.
|
|
244
|
-
*
|
|
245
|
-
* Finally, after rounding a {@code Double} object representing
|
|
246
|
-
* this {@code double} value is returned.
|
|
247
|
-
*
|
|
248
|
-
* <p> To interpret localized string representations of a
|
|
249
|
-
* floating-point value, use subclasses of {@link
|
|
250
|
-
* java.text.NumberFormat}.
|
|
251
|
-
*
|
|
252
|
-
* <p>Note that trailing format specifiers, specifiers that
|
|
253
|
-
* determine the type of a floating-point literal
|
|
254
|
-
* ({@code 1.0f} is a {@code float} value;
|
|
255
|
-
* {@code 1.0d} is a {@code double} value), do
|
|
256
|
-
* <em>not</em> influence the results of this method. In other
|
|
257
|
-
* words, the numerical value of the input string is converted
|
|
258
|
-
* directly to the target floating-point type. The two-step
|
|
259
|
-
* sequence of conversions, string to {@code float} followed
|
|
260
|
-
* by {@code float} to {@code double}, is <em>not</em>
|
|
261
|
-
* equivalent to converting a string directly to
|
|
262
|
-
* {@code double}. For example, the {@code float}
|
|
263
|
-
* literal {@code 0.1f} is equal to the {@code double}
|
|
264
|
-
* value {@code 0.10000000149011612}; the {@code float}
|
|
265
|
-
* literal {@code 0.1f} represents a different numerical
|
|
266
|
-
* value than the {@code double} literal
|
|
267
|
-
* {@code 0.1}. (The numerical value 0.1 cannot be exactly
|
|
268
|
-
* represented in a binary floating-point number.)
|
|
269
|
-
*
|
|
270
|
-
* <p>To avoid calling this method on an invalid string and having
|
|
271
|
-
* a {@code NumberFormatException} be thrown, the regular
|
|
272
|
-
* expression below can be used to screen the input string:
|
|
273
|
-
*
|
|
274
|
-
* <pre>{@code
|
|
275
|
-
* final String Digits = "(\\p{Digit}+)";
|
|
276
|
-
* final String HexDigits = "(\\p{XDigit}+)";
|
|
277
|
-
* // an exponent is 'e' or 'E' followed by an optionally
|
|
278
|
-
* // signed decimal integer.
|
|
279
|
-
* final String Exp = "[eE][+-]?"+Digits;
|
|
280
|
-
* final String fpRegex =
|
|
281
|
-
* ("[\\x00-\\x20]*"+ // Optional leading "whitespace"
|
|
282
|
-
* "[+-]?(" + // Optional sign character
|
|
283
|
-
* "NaN|" + // "NaN" string
|
|
284
|
-
* "Infinity|" + // "Infinity" string
|
|
285
|
-
*
|
|
286
|
-
* // A decimal floating-point string representing a finite positive
|
|
287
|
-
* // number without a leading sign has at most five basic pieces:
|
|
288
|
-
* // Digits . Digits ExponentPart FloatTypeSuffix
|
|
289
|
-
* //
|
|
290
|
-
* // Since this method allows integer-only strings as input
|
|
291
|
-
* // in addition to strings of floating-point literals, the
|
|
292
|
-
* // two sub-patterns below are simplifications of the grammar
|
|
293
|
-
* // productions from section 3.10.2 of
|
|
294
|
-
* // The Java Language Specification.
|
|
295
|
-
*
|
|
296
|
-
* // Digits ._opt Digits_opt ExponentPart_opt FloatTypeSuffix_opt
|
|
297
|
-
* "((("+Digits+"(\\.)?("+Digits+"?)("+Exp+")?)|"+
|
|
298
|
-
*
|
|
299
|
-
* // . Digits ExponentPart_opt FloatTypeSuffix_opt
|
|
300
|
-
* "(\\.("+Digits+")("+Exp+")?)|"+
|
|
301
|
-
*
|
|
302
|
-
* // Hexadecimal strings
|
|
303
|
-
* "((" +
|
|
304
|
-
* // 0[xX] HexDigits ._opt BinaryExponent FloatTypeSuffix_opt
|
|
305
|
-
* "(0[xX]" + HexDigits + "(\\.)?)|" +
|
|
306
|
-
*
|
|
307
|
-
* // 0[xX] HexDigits_opt . HexDigits BinaryExponent FloatTypeSuffix_opt
|
|
308
|
-
* "(0[xX]" + HexDigits + "?(\\.)" + HexDigits + ")" +
|
|
309
|
-
*
|
|
310
|
-
* ")[pP][+-]?" + Digits + "))" +
|
|
311
|
-
* "[fFdD]?))" +
|
|
312
|
-
* "[\\x00-\\x20]*");// Optional trailing "whitespace"
|
|
313
|
-
*
|
|
314
|
-
* if (Pattern.matches(fpRegex, myString))
|
|
315
|
-
* Double.valueOf(myString); // Will not throw NumberFormatException
|
|
316
|
-
* else {
|
|
317
|
-
* // Perform suitable alternative action
|
|
318
|
-
* }
|
|
319
|
-
* }</pre>
|
|
320
|
-
* @param s the string to be parsed.
|
|
321
|
-
* @return a {@code Double} object holding the value
 represented by the {@code String} argument.
|
|
322
|
-
* @throws NumberFormatException if the string does not contain a
 parsable number.
|
|
323
|
-
*/
|
|
324
|
-
valueOf(s: String | string): number;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Returns a {@code Double} instance representing the specified
|
|
328
|
-
* {@code double} value.
|
|
329
|
-
* If a new {@code Double} instance is not required, this method
|
|
330
|
-
* should generally be used in preference to the constructor
|
|
331
|
-
* {@link #Double(double)}, as this method is likely to yield
|
|
332
|
-
* significantly better space and time performance by caching
|
|
333
|
-
* frequently requested values.
|
|
334
|
-
* @param d a double value.
|
|
335
|
-
* @return a {@code Double} instance representing {@code d}.
|
|
336
|
-
* @since 1.5
|
|
337
|
-
*/
|
|
338
|
-
valueOf(d: number): number;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Returns a new {@code double} initialized to the value
|
|
342
|
-
* represented by the specified {@code String}, as performed
|
|
343
|
-
* by the {@code valueOf} method of class
|
|
344
|
-
* {@code Double}.
|
|
345
|
-
* @param s the string to be parsed.
|
|
346
|
-
* @return the {@code double} value represented by the string
 argument.
|
|
347
|
-
* @throws NullPointerException if the string is null
|
|
348
|
-
* @throws NumberFormatException if the string does not contain
 a parsable {@code double}.
|
|
349
|
-
* @see java.lang.Double#valueOf(String)
|
|
350
|
-
* @since 1.2
|
|
351
|
-
*/
|
|
352
|
-
parseDouble(s: String | string): number;
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Returns {@code true} if the specified number is a
|
|
356
|
-
* Not-a-Number (NaN) value, {@code false} otherwise.
|
|
357
|
-
* @param v the value to be tested.
|
|
358
|
-
* @return {@code true} if the value of the argument is NaN;
 {@code false} otherwise.
|
|
359
|
-
*/
|
|
360
|
-
isNaN(v: number): boolean;
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Returns {@code true} if the specified number is infinitely
|
|
364
|
-
* large in magnitude, {@code false} otherwise.
|
|
365
|
-
* @param v the value to be tested.
|
|
366
|
-
* @return {@code true} if the value of the argument is positive
 infinity or negative infinity; {@code false} otherwise.
|
|
367
|
-
*/
|
|
368
|
-
isInfinite(v: number): boolean;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Returns {@code true} if the argument is a finite floating-point
|
|
372
|
-
* value; returns {@code false} otherwise (for NaN and infinity
|
|
373
|
-
* arguments).
|
|
374
|
-
* @param d the {@code double} value to be tested
|
|
375
|
-
* @return {@code true} if the argument is a finite
 floating-point value, {@code false} otherwise.
|
|
376
|
-
* @since 1.8
|
|
377
|
-
*/
|
|
378
|
-
isFinite(d: number): boolean;
|
|
379
|
-
|
|
380
26
|
/**
|
|
381
27
|
* Returns {@code true} if this {@code Double} value is
|
|
382
28
|
* a Not-a-Number (NaN), {@code false} otherwise.
|
|
@@ -472,15 +118,6 @@ export type Double = Number &
|
|
|
472
118
|
*/
|
|
473
119
|
hashCode(): number;
|
|
474
120
|
|
|
475
|
-
/**
|
|
476
|
-
* Returns a hash code for a {@code double} value; compatible with
|
|
477
|
-
* {@code Double.hashCode()}.
|
|
478
|
-
* @param value the value to hash
|
|
479
|
-
* @return a hash code value for a {@code double} value.
|
|
480
|
-
* @since 1.8
|
|
481
|
-
*/
|
|
482
|
-
hashCode(value: number): number;
|
|
483
|
-
|
|
484
121
|
/**
|
|
485
122
|
* Compares this object against the specified object. The result
|
|
486
123
|
* is {@code true} if and only if the argument is not
|
|
@@ -521,137 +158,6 @@ export type Double = Number &
|
|
|
521
158
|
*/
|
|
522
159
|
equals(obj: unknown): boolean;
|
|
523
160
|
|
|
524
|
-
/**
|
|
525
|
-
* Returns a representation of the specified floating-point value
|
|
526
|
-
* according to the IEEE 754 floating-point "double
|
|
527
|
-
* format" bit layout.
|
|
528
|
-
*
|
|
529
|
-
* <p>Bit 63 (the bit that is selected by the mask
|
|
530
|
-
* {@code 0x8000000000000000L}) represents the sign of the
|
|
531
|
-
* floating-point number. Bits
|
|
532
|
-
* 62-52 (the bits that are selected by the mask
|
|
533
|
-
* {@code 0x7ff0000000000000L}) represent the exponent. Bits 51-0
|
|
534
|
-
* (the bits that are selected by the mask
|
|
535
|
-
* {@code 0x000fffffffffffffL}) represent the significand
|
|
536
|
-
* (sometimes called the mantissa) of the floating-point number.
|
|
537
|
-
*
|
|
538
|
-
* <p>If the argument is positive infinity, the result is
|
|
539
|
-
* {@code 0x7ff0000000000000L}.
|
|
540
|
-
*
|
|
541
|
-
* <p>If the argument is negative infinity, the result is
|
|
542
|
-
* {@code 0xfff0000000000000L}.
|
|
543
|
-
*
|
|
544
|
-
* <p>If the argument is NaN, the result is
|
|
545
|
-
* {@code 0x7ff8000000000000L}.
|
|
546
|
-
*
|
|
547
|
-
* <p>In all cases, the result is a {@code long} integer that, when
|
|
548
|
-
* given to the {@link #longBitsToDouble(long)} method, will produce a
|
|
549
|
-
* floating-point value the same as the argument to
|
|
550
|
-
* {@code doubleToLongBits} (except all NaN values are
|
|
551
|
-
* collapsed to a single "canonical" NaN value).
|
|
552
|
-
* @param value a {@code double} precision floating-point number.
|
|
553
|
-
* @return the bits that represent the floating-point number.
|
|
554
|
-
*/
|
|
555
|
-
doubleToLongBits(value: number): number;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Returns a representation of the specified floating-point value
|
|
559
|
-
* according to the IEEE 754 floating-point "double
|
|
560
|
-
* format" bit layout, preserving Not-a-Number (NaN) values.
|
|
561
|
-
*
|
|
562
|
-
* <p>Bit 63 (the bit that is selected by the mask
|
|
563
|
-
* {@code 0x8000000000000000L}) represents the sign of the
|
|
564
|
-
* floating-point number. Bits
|
|
565
|
-
* 62-52 (the bits that are selected by the mask
|
|
566
|
-
* {@code 0x7ff0000000000000L}) represent the exponent. Bits 51-0
|
|
567
|
-
* (the bits that are selected by the mask
|
|
568
|
-
* {@code 0x000fffffffffffffL}) represent the significand
|
|
569
|
-
* (sometimes called the mantissa) of the floating-point number.
|
|
570
|
-
*
|
|
571
|
-
* <p>If the argument is positive infinity, the result is
|
|
572
|
-
* {@code 0x7ff0000000000000L}.
|
|
573
|
-
*
|
|
574
|
-
* <p>If the argument is negative infinity, the result is
|
|
575
|
-
* {@code 0xfff0000000000000L}.
|
|
576
|
-
*
|
|
577
|
-
* <p>If the argument is NaN, the result is the {@code long}
|
|
578
|
-
* integer representing the actual NaN value. Unlike the
|
|
579
|
-
* {@code doubleToLongBits} method,
|
|
580
|
-
* {@code doubleToRawLongBits} does not collapse all the bit
|
|
581
|
-
* patterns encoding a NaN to a single "canonical" NaN
|
|
582
|
-
* value.
|
|
583
|
-
*
|
|
584
|
-
* <p>In all cases, the result is a {@code long} integer that,
|
|
585
|
-
* when given to the {@link #longBitsToDouble(long)} method, will
|
|
586
|
-
* produce a floating-point value the same as the argument to
|
|
587
|
-
* {@code doubleToRawLongBits}.
|
|
588
|
-
* @param value a {@code double} precision floating-point number.
|
|
589
|
-
* @return the bits that represent the floating-point number.
|
|
590
|
-
* @since 1.3
|
|
591
|
-
*/
|
|
592
|
-
doubleToRawLongBits(value: number): number;
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Returns the {@code double} value corresponding to a given
|
|
596
|
-
* bit representation.
|
|
597
|
-
* The argument is considered to be a representation of a
|
|
598
|
-
* floating-point value according to the IEEE 754 floating-point
|
|
599
|
-
* "double format" bit layout.
|
|
600
|
-
*
|
|
601
|
-
* <p>If the argument is {@code 0x7ff0000000000000L}, the result
|
|
602
|
-
* is positive infinity.
|
|
603
|
-
*
|
|
604
|
-
* <p>If the argument is {@code 0xfff0000000000000L}, the result
|
|
605
|
-
* is negative infinity.
|
|
606
|
-
*
|
|
607
|
-
* <p>If the argument is any value in the range
|
|
608
|
-
* {@code 0x7ff0000000000001L} through
|
|
609
|
-
* {@code 0x7fffffffffffffffL} or in the range
|
|
610
|
-
* {@code 0xfff0000000000001L} through
|
|
611
|
-
* {@code 0xffffffffffffffffL}, the result is a NaN. No IEEE
|
|
612
|
-
* 754 floating-point operation provided by Java can distinguish
|
|
613
|
-
* between two NaN values of the same type with different bit
|
|
614
|
-
* patterns. Distinct values of NaN are only distinguishable by
|
|
615
|
-
* use of the {@code Double.doubleToRawLongBits} method.
|
|
616
|
-
*
|
|
617
|
-
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
|
|
618
|
-
* values that can be computed from the argument:
|
|
619
|
-
*
|
|
620
|
-
* <blockquote><pre>{@code
|
|
621
|
-
* int s = ((bits >> 63) == 0) ? 1 : -1;
|
|
622
|
-
* int e = (int)((bits >> 52) & 0x7ffL);
|
|
623
|
-
* long m = (e == 0) ?
|
|
624
|
-
* (bits & 0xfffffffffffffL) << 1 :
|
|
625
|
-
* (bits & 0xfffffffffffffL) | 0x10000000000000L;
|
|
626
|
-
* }</pre></blockquote>
|
|
627
|
-
*
|
|
628
|
-
* Then the floating-point result equals the value of the mathematical
|
|
629
|
-
* expression <i>s</i>·<i>m</i>·2<sup><i>e</i>-1075</sup>.
|
|
630
|
-
*
|
|
631
|
-
* <p>Note that this method may not be able to return a
|
|
632
|
-
* {@code double} NaN with exactly same bit pattern as the
|
|
633
|
-
* {@code long} argument. IEEE 754 distinguishes between two
|
|
634
|
-
* kinds of NaNs, quiet NaNs and <i>signaling NaNs</i>. The
|
|
635
|
-
* differences between the two kinds of NaN are generally not
|
|
636
|
-
* visible in Java. Arithmetic operations on signaling NaNs turn
|
|
637
|
-
* them into quiet NaNs with a different, but often similar, bit
|
|
638
|
-
* pattern. However, on some processors merely copying a
|
|
639
|
-
* signaling NaN also performs that conversion. In particular,
|
|
640
|
-
* copying a signaling NaN to return it to the calling method
|
|
641
|
-
* may perform this conversion. So {@code longBitsToDouble}
|
|
642
|
-
* may not be able to return a {@code double} with a
|
|
643
|
-
* signaling NaN bit pattern. Consequently, for some
|
|
644
|
-
* {@code long} values,
|
|
645
|
-
* {@code doubleToRawLongBits(longBitsToDouble(start))} may
|
|
646
|
-
* <i>not</i> equal {@code start}. Moreover, which
|
|
647
|
-
* particular bit patterns represent signaling NaNs is platform
|
|
648
|
-
* dependent; although all NaN bit patterns, quiet or signaling,
|
|
649
|
-
* must be in the NaN range identified above.
|
|
650
|
-
* @param bits any {@code long} integer.
|
|
651
|
-
* @return the {@code double} floating-point value with the same
 bit pattern.
|
|
652
|
-
*/
|
|
653
|
-
longBitsToDouble(bits: number): number;
|
|
654
|
-
|
|
655
161
|
/**
|
|
656
162
|
* Compares two {@code Double} objects numerically. There
|
|
657
163
|
* are two ways in which comparisons performed by this method
|
|
@@ -676,53 +182,6 @@ export type Double = Number &
|
|
|
676
182
|
*/
|
|
677
183
|
compareTo(anotherDouble: Double | number): number;
|
|
678
184
|
|
|
679
|
-
/**
|
|
680
|
-
* Compares the two specified {@code double} values. The sign
|
|
681
|
-
* of the integer value returned is the same as that of the
|
|
682
|
-
* integer that would be returned by the call:
|
|
683
|
-
* <pre>
|
|
684
|
-
* new Double(d1).compareTo(new Double(d2))
|
|
685
|
-
* </pre>
|
|
686
|
-
* @param d1 the first {@code double} to compare
|
|
687
|
-
* @param d2 the second {@code double} to compare
|
|
688
|
-
* @return the value {@code 0} if {@code d1} is
 numerically equal to {@code d2}; a value less than
 {@code 0} if {@code d1} is numerically less than
 {@code d2}; and a value greater than {@code 0}
 if {@code d1} is numerically greater than
 {@code d2}.
|
|
689
|
-
* @since 1.4
|
|
690
|
-
*/
|
|
691
|
-
compare(d1: number, d2: number): number;
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* Adds two {@code double} values together as per the + operator.
|
|
695
|
-
* @param a the first operand
|
|
696
|
-
* @param b the second operand
|
|
697
|
-
* @return the sum of {@code a} and {@code b}
|
|
698
|
-
* @jls 4.2.4 Floating-Point Operations
|
|
699
|
-
* @see java.util.function.BinaryOperator
|
|
700
|
-
* @since 1.8
|
|
701
|
-
*/
|
|
702
|
-
sum(a: number, b: number): number;
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* Returns the greater of two {@code double} values
|
|
706
|
-
* as if by calling {@link Math#max(double, double) Math.max}.
|
|
707
|
-
* @param a the first operand
|
|
708
|
-
* @param b the second operand
|
|
709
|
-
* @return the greater of {@code a} and {@code b}
|
|
710
|
-
* @see java.util.function.BinaryOperator
|
|
711
|
-
* @since 1.8
|
|
712
|
-
*/
|
|
713
|
-
max(a: number, b: number): number;
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Returns the smaller of two {@code double} values
|
|
717
|
-
* as if by calling {@link Math#min(double, double) Math.min}.
|
|
718
|
-
* @param a the first operand
|
|
719
|
-
* @param b the second operand
|
|
720
|
-
* @return the smaller of {@code a} and {@code b}.
|
|
721
|
-
* @see java.util.function.BinaryOperator
|
|
722
|
-
* @since 1.8
|
|
723
|
-
*/
|
|
724
|
-
min(a: number, b: number): number;
|
|
725
|
-
|
|
726
185
|
/**
|
|
727
186
|
* A constant holding the positive infinity of type
|
|
728
187
|
* {@code double}. It is equal to the value returned by
|
|
@@ -5,13 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
toString: function toString() {},
|
|
9
|
-
toHexString: function toHexString() {},
|
|
10
|
-
valueOf: function valueOf() {},
|
|
11
|
-
parseDouble: function parseDouble() {},
|
|
12
8
|
isNaN: function isNaN() {},
|
|
13
9
|
isInfinite: function isInfinite() {},
|
|
14
|
-
|
|
10
|
+
toString: function toString() {},
|
|
15
11
|
byteValue: function byteValue() {},
|
|
16
12
|
shortValue: function shortValue() {},
|
|
17
13
|
intValue: function intValue() {},
|
|
@@ -20,13 +16,6 @@ var _default = {
|
|
|
20
16
|
doubleValue: function doubleValue() {},
|
|
21
17
|
hashCode: function hashCode() {},
|
|
22
18
|
equals: function equals() {},
|
|
23
|
-
|
|
24
|
-
doubleToRawLongBits: function doubleToRawLongBits() {},
|
|
25
|
-
longBitsToDouble: function longBitsToDouble() {},
|
|
26
|
-
compareTo: function compareTo() {},
|
|
27
|
-
compare: function compare() {},
|
|
28
|
-
sum: function sum() {},
|
|
29
|
-
max: function max() {},
|
|
30
|
-
min: function min() {}
|
|
19
|
+
compareTo: function compareTo() {}
|
|
31
20
|
};
|
|
32
21
|
exports["default"] = _default;
|
|
@@ -110,29 +110,6 @@ export type Enum = Object &
|
|
|
110
110
|
*/
|
|
111
111
|
getDeclaringClass(): Class;
|
|
112
112
|
|
|
113
|
-
/**
|
|
114
|
-
* Returns the enum constant of the specified enum type with the
|
|
115
|
-
* specified name. The name must match exactly an identifier used
|
|
116
|
-
* to declare an enum constant in this type. (Extraneous whitespace
|
|
117
|
-
* characters are not permitted.)
|
|
118
|
-
*
|
|
119
|
-
* <p>Note that for a particular enum type {@code T}, the
|
|
120
|
-
* implicitly declared {@code public static T valueOf(String)}
|
|
121
|
-
* method on that enum may be used instead of this method to map
|
|
122
|
-
* from a name to the corresponding enum constant. All the
|
|
123
|
-
* constants of an enum type can be obtained by calling the
|
|
124
|
-
* implicit {@code public static T[] values()} method of that
|
|
125
|
-
* type.
|
|
126
|
-
* @param <T> The enum type whose constant is to be returned
|
|
127
|
-
* @param enumType the {@code Class} object of the enum type from which
 to return a constant
|
|
128
|
-
* @param name the name of the constant to return
|
|
129
|
-
* @return the enum constant of the specified enum type with the
 specified name
|
|
130
|
-
* @throws IllegalArgumentException if the specified enum type has
 no constant with the specified name, or the specified
 class object does not represent an enum type
|
|
131
|
-
* @throws NullPointerException if {@code enumType} or {@code name}
 is null
|
|
132
|
-
* @since 1.5
|
|
133
|
-
*/
|
|
134
|
-
valueOf(enumType: Class, name: String | string): unknown;
|
|
135
|
-
|
|
136
113
|
/**
|
|
137
114
|
* enum classes cannot have finalize methods.
|
|
138
115
|
|