@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,317 +23,6 @@ import type { Class } from "../Class";
|
|
|
23
23
|
*/
|
|
24
24
|
export type Float = Number &
|
|
25
25
|
Comparable & {
|
|
26
|
-
/**
|
|
27
|
-
* Returns a string representation of the {@code float}
|
|
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
|
|
34
|
-
* negative, the first character of the result is
|
|
35
|
-
* '{@code -}' ({@code '\u002D'}); if the sign is
|
|
36
|
-
* positive, no sign character appears in the result. As for
|
|
37
|
-
* the magnitude <i>m</i>:
|
|
38
|
-
* <ul>
|
|
39
|
-
* <li>If <i>m</i> is infinity, it is represented by the characters
|
|
40
|
-
* {@code "Infinity"}; thus, positive infinity produces
|
|
41
|
-
* the result {@code "Infinity"} and negative infinity
|
|
42
|
-
* produces the result {@code "-Infinity"}.
|
|
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
|
-
* <li> If <i>m</i> is greater than or equal to 10<sup>-3</sup> but
|
|
48
|
-
* less than 10<sup>7</sup>, then it is represented as the
|
|
49
|
-
* integer part of <i>m</i>, in decimal form with no leading
|
|
50
|
-
* zeroes, followed by '{@code .}'
|
|
51
|
-
* ({@code '\u002E'}), followed by one or more
|
|
52
|
-
* decimal digits representing the fractional part of
|
|
53
|
-
* <i>m</i>.
|
|
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
|
|
56
|
-
* so-called "computerized scientific notation." Let <i>n</i>
|
|
57
|
-
* be the unique integer such that 10<sup><i>n</i> </sup>≤
|
|
58
|
-
* <i>m</i> {@literal <} 10<sup><i>n</i>+1</sup>; then let <i>a</i>
|
|
59
|
-
* be the mathematically exact quotient of <i>m</i> and
|
|
60
|
-
* 10<sup><i>n</i></sup> so that 1 ≤ <i>a</i> {@literal <} 10.
|
|
61
|
-
* The magnitude is then represented as the integer part of
|
|
62
|
-
* <i>a</i>, as a single decimal digit, followed by
|
|
63
|
-
* '{@code .}' ({@code '\u002E'}), followed by
|
|
64
|
-
* decimal digits representing the fractional part of
|
|
65
|
-
* <i>a</i>, followed by the letter '{@code E}'
|
|
66
|
-
* ({@code '\u0045'}), followed by a representation
|
|
67
|
-
* of <i>n</i> as a decimal integer, as produced by the
|
|
68
|
-
* method {@link java.lang.Integer#toString(int)}.
|
|
69
|
-
*
|
|
70
|
-
* </ul>
|
|
71
|
-
* </ul>
|
|
72
|
-
* How many digits must be printed for the fractional part of
|
|
73
|
-
* <i>m</i> or <i>a</i>? There must be at least one digit
|
|
74
|
-
* to represent the fractional part, and beyond that as many, but
|
|
75
|
-
* only as many, more digits as are needed to uniquely distinguish
|
|
76
|
-
* the argument value from adjacent values of type
|
|
77
|
-
* {@code float}. That is, suppose that <i>x</i> is the
|
|
78
|
-
* exact mathematical value represented by the decimal
|
|
79
|
-
* representation produced by this method for a finite nonzero
|
|
80
|
-
* argument <i>f</i>. Then <i>f</i> must be the {@code float}
|
|
81
|
-
* value nearest to <i>x</i>; or, if two {@code float} values are
|
|
82
|
-
* equally close to <i>x</i>, then <i>f</i> must be one of
|
|
83
|
-
* them and the least significant bit of the significand of
|
|
84
|
-
* <i>f</i> must be {@code 0}.
|
|
85
|
-
*
|
|
86
|
-
* <p>To create localized string representations of a floating-point
|
|
87
|
-
* value, use subclasses of {@link java.text.NumberFormat}.
|
|
88
|
-
* @param f the float to be converted.
|
|
89
|
-
* @return a string representation of the argument.
|
|
90
|
-
*/
|
|
91
|
-
toString(f: number): string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Returns a hexadecimal string representation of the
|
|
95
|
-
* {@code float} argument. All characters mentioned below are
|
|
96
|
-
* ASCII characters.
|
|
97
|
-
*
|
|
98
|
-
* <ul>
|
|
99
|
-
* <li>If the argument is NaN, the result is the string
|
|
100
|
-
* "{@code NaN}".
|
|
101
|
-
* <li>Otherwise, the result is a string that represents the sign and
|
|
102
|
-
* magnitude (absolute value) of the argument. If the sign is negative,
|
|
103
|
-
* the first character of the result is '{@code -}'
|
|
104
|
-
* ({@code '\u002D'}); if the sign is positive, no sign character
|
|
105
|
-
* appears in the result. As for the magnitude <i>m</i>:
|
|
106
|
-
*
|
|
107
|
-
* <ul>
|
|
108
|
-
* <li>If <i>m</i> is infinity, it is represented by the string
|
|
109
|
-
* {@code "Infinity"}; thus, positive infinity produces the
|
|
110
|
-
* result {@code "Infinity"} and negative infinity produces
|
|
111
|
-
* the result {@code "-Infinity"}.
|
|
112
|
-
*
|
|
113
|
-
* <li>If <i>m</i> is zero, it is represented by the string
|
|
114
|
-
* {@code "0x0.0p0"}; thus, negative zero produces the result
|
|
115
|
-
* {@code "-0x0.0p0"} and positive zero produces the result
|
|
116
|
-
* {@code "0x0.0p0"}.
|
|
117
|
-
*
|
|
118
|
-
* <li>If <i>m</i> is a {@code float} value with a
|
|
119
|
-
* normalized representation, substrings are used to represent the
|
|
120
|
-
* significand and exponent fields. The significand is
|
|
121
|
-
* represented by the characters {@code "0x1."}
|
|
122
|
-
* followed by a lowercase hexadecimal representation of the rest
|
|
123
|
-
* of the significand as a fraction. Trailing zeros in the
|
|
124
|
-
* hexadecimal representation are removed unless all the digits
|
|
125
|
-
* are zero, in which case a single zero is used. Next, the
|
|
126
|
-
* exponent is represented by {@code "p"} followed
|
|
127
|
-
* by a decimal string of the unbiased exponent as if produced by
|
|
128
|
-
* a call to {@link Integer#toString(int) Integer.toString} on the
|
|
129
|
-
* exponent value.
|
|
130
|
-
*
|
|
131
|
-
* <li>If <i>m</i> is a {@code float} value with a subnormal
|
|
132
|
-
* representation, the significand is represented by the
|
|
133
|
-
* characters {@code "0x0."} followed by a
|
|
134
|
-
* hexadecimal representation of the rest of the significand as a
|
|
135
|
-
* fraction. Trailing zeros in the hexadecimal representation are
|
|
136
|
-
* removed. Next, the exponent is represented by
|
|
137
|
-
* {@code "p-126"}. Note that there must be at
|
|
138
|
-
* least one nonzero digit in a subnormal significand.
|
|
139
|
-
*
|
|
140
|
-
* </ul>
|
|
141
|
-
*
|
|
142
|
-
* </ul>
|
|
143
|
-
*
|
|
144
|
-
* <table border>
|
|
145
|
-
* <caption>Examples</caption>
|
|
146
|
-
* <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
|
|
147
|
-
* <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
|
|
148
|
-
* <tr><td>{@code -1.0}</td> <td>{@code -0x1.0p0}</td>
|
|
149
|
-
* <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
|
|
150
|
-
* <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
|
|
151
|
-
* <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
|
|
152
|
-
* <tr><td>{@code 0.25}</td> <td>{@code 0x1.0p-2}</td>
|
|
153
|
-
* <tr><td>{@code Float.MAX_VALUE}</td>
|
|
154
|
-
* <td>{@code 0x1.fffffep127}</td>
|
|
155
|
-
* <tr><td>{@code Minimum Normal Value}</td>
|
|
156
|
-
* <td>{@code 0x1.0p-126}</td>
|
|
157
|
-
* <tr><td>{@code Maximum Subnormal Value}</td>
|
|
158
|
-
* <td>{@code 0x0.fffffep-126}</td>
|
|
159
|
-
* <tr><td>{@code Float.MIN_VALUE}</td>
|
|
160
|
-
* <td>{@code 0x0.000002p-126}</td>
|
|
161
|
-
* </table>
|
|
162
|
-
* @param f the {@code float} to be converted.
|
|
163
|
-
* @return a hex string representation of the argument.
|
|
164
|
-
* @since 1.5
|
|
165
|
-
* @author Joseph D. Darcy
|
|
166
|
-
*/
|
|
167
|
-
toHexString(f: number): string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Returns a {@code Float} object holding the
|
|
171
|
-
* {@code float} value represented by the argument string
|
|
172
|
-
* {@code s}.
|
|
173
|
-
*
|
|
174
|
-
* <p>If {@code s} is {@code null}, then a
|
|
175
|
-
* {@code NullPointerException} is thrown.
|
|
176
|
-
*
|
|
177
|
-
* <p>Leading and trailing whitespace characters in {@code s}
|
|
178
|
-
* are ignored. Whitespace is removed as if by the {@link
|
|
179
|
-
* String#trim} method; that is, both ASCII space and control
|
|
180
|
-
* characters are removed. The rest of {@code s} should
|
|
181
|
-
* constitute a <i>FloatValue</i> as described by the lexical
|
|
182
|
-
* syntax rules:
|
|
183
|
-
*
|
|
184
|
-
* <blockquote>
|
|
185
|
-
* <dl>
|
|
186
|
-
* <dt><i>FloatValue:</i>
|
|
187
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code NaN}
|
|
188
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code Infinity}
|
|
189
|
-
* <dd><i>Sign<sub>opt</sub> FloatingPointLiteral</i>
|
|
190
|
-
* <dd><i>Sign<sub>opt</sub> HexFloatingPointLiteral</i>
|
|
191
|
-
* <dd><i>SignedInteger</i>
|
|
192
|
-
* </dl>
|
|
193
|
-
*
|
|
194
|
-
* <dl>
|
|
195
|
-
* <dt><i>HexFloatingPointLiteral</i>:
|
|
196
|
-
* <dd> <i>HexSignificand BinaryExponent FloatTypeSuffix<sub>opt</sub></i>
|
|
197
|
-
* </dl>
|
|
198
|
-
*
|
|
199
|
-
* <dl>
|
|
200
|
-
* <dt><i>HexSignificand:</i>
|
|
201
|
-
* <dd><i>HexNumeral</i>
|
|
202
|
-
* <dd><i>HexNumeral</i> {@code .}
|
|
203
|
-
* <dd>{@code 0x} <i>HexDigits<sub>opt</sub>
|
|
204
|
-
* </i>{@code .}<i> HexDigits</i>
|
|
205
|
-
* <dd>{@code 0X}<i> HexDigits<sub>opt</sub>
|
|
206
|
-
* </i>{@code .} <i>HexDigits</i>
|
|
207
|
-
* </dl>
|
|
208
|
-
*
|
|
209
|
-
* <dl>
|
|
210
|
-
* <dt><i>BinaryExponent:</i>
|
|
211
|
-
* <dd><i>BinaryExponentIndicator SignedInteger</i>
|
|
212
|
-
* </dl>
|
|
213
|
-
*
|
|
214
|
-
* <dl>
|
|
215
|
-
* <dt><i>BinaryExponentIndicator:</i>
|
|
216
|
-
* <dd>{@code p}
|
|
217
|
-
* <dd>{@code P}
|
|
218
|
-
* </dl>
|
|
219
|
-
*
|
|
220
|
-
* </blockquote>
|
|
221
|
-
*
|
|
222
|
-
* where <i>Sign</i>, <i>FloatingPointLiteral</i>,
|
|
223
|
-
* <i>HexNumeral</i>, <i>HexDigits</i>, <i>SignedInteger</i> and
|
|
224
|
-
* <i>FloatTypeSuffix</i> are as defined in the lexical structure
|
|
225
|
-
* sections of
|
|
226
|
-
* <cite>The Java™ Language Specification</cite>,
|
|
227
|
-
* except that underscores are not accepted between digits.
|
|
228
|
-
* If {@code s} does not have the form of
|
|
229
|
-
* a <i>FloatValue</i>, then a {@code NumberFormatException}
|
|
230
|
-
* is thrown. Otherwise, {@code s} is regarded as
|
|
231
|
-
* representing an exact decimal value in the usual
|
|
232
|
-
* "computerized scientific notation" or as an exact
|
|
233
|
-
* hexadecimal value; this exact numerical value is then
|
|
234
|
-
* conceptually converted to an "infinitely precise"
|
|
235
|
-
* binary value that is then rounded to type {@code float}
|
|
236
|
-
* by the usual round-to-nearest rule of IEEE 754 floating-point
|
|
237
|
-
* arithmetic, which includes preserving the sign of a zero
|
|
238
|
-
* value.
|
|
239
|
-
*
|
|
240
|
-
* Note that the round-to-nearest rule also implies overflow and
|
|
241
|
-
* underflow behaviour; if the exact value of {@code s} is large
|
|
242
|
-
* enough in magnitude (greater than or equal to ({@link
|
|
243
|
-
* #MAX_VALUE} + {@link Math#ulp(float) ulp(MAX_VALUE)}/2),
|
|
244
|
-
* rounding to {@code float} will result in an infinity and if the
|
|
245
|
-
* exact value of {@code s} is small enough in magnitude (less
|
|
246
|
-
* than or equal to {@link #MIN_VALUE}/2), rounding to float will
|
|
247
|
-
* result in a zero.
|
|
248
|
-
*
|
|
249
|
-
* Finally, after rounding a {@code Float} object representing
|
|
250
|
-
* this {@code float} value is returned.
|
|
251
|
-
*
|
|
252
|
-
* <p>To interpret localized string representations of a
|
|
253
|
-
* floating-point value, use subclasses of {@link
|
|
254
|
-
* java.text.NumberFormat}.
|
|
255
|
-
*
|
|
256
|
-
* <p>Note that trailing format specifiers, specifiers that
|
|
257
|
-
* determine the type of a floating-point literal
|
|
258
|
-
* ({@code 1.0f} is a {@code float} value;
|
|
259
|
-
* {@code 1.0d} is a {@code double} value), do
|
|
260
|
-
* <em>not</em> influence the results of this method. In other
|
|
261
|
-
* words, the numerical value of the input string is converted
|
|
262
|
-
* directly to the target floating-point type. In general, the
|
|
263
|
-
* two-step sequence of conversions, string to {@code double}
|
|
264
|
-
* followed by {@code double} to {@code float}, is
|
|
265
|
-
* <em>not</em> equivalent to converting a string directly to
|
|
266
|
-
* {@code float}. For example, if first converted to an
|
|
267
|
-
* intermediate {@code double} and then to
|
|
268
|
-
* {@code float}, the string<br>
|
|
269
|
-
* {@code "1.00000017881393421514957253748434595763683319091796875001d"}<br>
|
|
270
|
-
* results in the {@code float} value
|
|
271
|
-
* {@code 1.0000002f}; if the string is converted directly to
|
|
272
|
-
* {@code float}, <code>1.000000<b>1</b>f</code> results.
|
|
273
|
-
*
|
|
274
|
-
* <p>To avoid calling this method on an invalid string and having
|
|
275
|
-
* a {@code NumberFormatException} be thrown, the documentation
|
|
276
|
-
* for {@link Double#valueOf Double.valueOf} lists a regular
|
|
277
|
-
* expression which can be used to screen the input.
|
|
278
|
-
* @param s the string to be parsed.
|
|
279
|
-
* @return a {@code Float} object holding the value
 represented by the {@code String} argument.
|
|
280
|
-
* @throws NumberFormatException if the string does not contain a
 parsable number.
|
|
281
|
-
*/
|
|
282
|
-
valueOf(s: String | string): number;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Returns a {@code Float} instance representing the specified
|
|
286
|
-
* {@code float} value.
|
|
287
|
-
* If a new {@code Float} instance is not required, this method
|
|
288
|
-
* should generally be used in preference to the constructor
|
|
289
|
-
* {@link #Float(float)}, as this method is likely to yield
|
|
290
|
-
* significantly better space and time performance by caching
|
|
291
|
-
* frequently requested values.
|
|
292
|
-
* @param f a float value.
|
|
293
|
-
* @return a {@code Float} instance representing {@code f}.
|
|
294
|
-
* @since 1.5
|
|
295
|
-
*/
|
|
296
|
-
valueOf(f: number): number;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Returns a new {@code float} initialized to the value
|
|
300
|
-
* represented by the specified {@code String}, as performed
|
|
301
|
-
* by the {@code valueOf} method of class {@code Float}.
|
|
302
|
-
* @param s the string to be parsed.
|
|
303
|
-
* @return the {@code float} value represented by the string
 argument.
|
|
304
|
-
* @throws NullPointerException if the string is null
|
|
305
|
-
* @throws NumberFormatException if the string does not contain a
 parsable {@code float}.
|
|
306
|
-
* @see java.lang.Float#valueOf(String)
|
|
307
|
-
* @since 1.2
|
|
308
|
-
*/
|
|
309
|
-
parseFloat(s: String | string): number;
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Returns {@code true} if the specified number is a
|
|
313
|
-
* Not-a-Number (NaN) value, {@code false} otherwise.
|
|
314
|
-
* @param v the value to be tested.
|
|
315
|
-
* @return {@code true} if the argument is NaN;
 {@code false} otherwise.
|
|
316
|
-
*/
|
|
317
|
-
isNaN(v: number): boolean;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Returns {@code true} if the specified number is infinitely
|
|
321
|
-
* large in magnitude, {@code false} otherwise.
|
|
322
|
-
* @param v the value to be tested.
|
|
323
|
-
* @return {@code true} if the argument is positive infinity or
 negative infinity; {@code false} otherwise.
|
|
324
|
-
*/
|
|
325
|
-
isInfinite(v: number): boolean;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Returns {@code true} if the argument is a finite floating-point
|
|
329
|
-
* value; returns {@code false} otherwise (for NaN and infinity
|
|
330
|
-
* arguments).
|
|
331
|
-
* @param f the {@code float} value to be tested
|
|
332
|
-
* @return {@code true} if the argument is a finite
 floating-point value, {@code false} otherwise.
|
|
333
|
-
* @since 1.8
|
|
334
|
-
*/
|
|
335
|
-
isFinite(f: number): boolean;
|
|
336
|
-
|
|
337
26
|
/**
|
|
338
27
|
* Returns {@code true} if this {@code Float} value is a
|
|
339
28
|
* Not-a-Number (NaN), {@code false} otherwise.
|
|
@@ -415,15 +104,6 @@ export type Float = Number &
|
|
|
415
104
|
*/
|
|
416
105
|
hashCode(): number;
|
|
417
106
|
|
|
418
|
-
/**
|
|
419
|
-
* Returns a hash code for a {@code float} value; compatible with
|
|
420
|
-
* {@code Float.hashCode()}.
|
|
421
|
-
* @param value the value to hash
|
|
422
|
-
* @return a hash code value for a {@code float} value.
|
|
423
|
-
* @since 1.8
|
|
424
|
-
*/
|
|
425
|
-
hashCode(value: number): number;
|
|
426
|
-
|
|
427
107
|
/**
|
|
428
108
|
* Compares this object against the specified object. The result
|
|
429
109
|
* is {@code true} if and only if the argument is not
|
|
@@ -463,133 +143,6 @@ export type Float = Number &
|
|
|
463
143
|
*/
|
|
464
144
|
equals(obj: unknown): boolean;
|
|
465
145
|
|
|
466
|
-
/**
|
|
467
|
-
* Returns a representation of the specified floating-point value
|
|
468
|
-
* according to the IEEE 754 floating-point "single format" bit
|
|
469
|
-
* layout.
|
|
470
|
-
*
|
|
471
|
-
* <p>Bit 31 (the bit that is selected by the mask
|
|
472
|
-
* {@code 0x80000000}) represents the sign of the floating-point
|
|
473
|
-
* number.
|
|
474
|
-
* Bits 30-23 (the bits that are selected by the mask
|
|
475
|
-
* {@code 0x7f800000}) represent the exponent.
|
|
476
|
-
* Bits 22-0 (the bits that are selected by the mask
|
|
477
|
-
* {@code 0x007fffff}) represent the significand (sometimes called
|
|
478
|
-
* the mantissa) of the floating-point number.
|
|
479
|
-
*
|
|
480
|
-
* <p>If the argument is positive infinity, the result is
|
|
481
|
-
* {@code 0x7f800000}.
|
|
482
|
-
*
|
|
483
|
-
* <p>If the argument is negative infinity, the result is
|
|
484
|
-
* {@code 0xff800000}.
|
|
485
|
-
*
|
|
486
|
-
* <p>If the argument is NaN, the result is {@code 0x7fc00000}.
|
|
487
|
-
*
|
|
488
|
-
* <p>In all cases, the result is an integer that, when given to the
|
|
489
|
-
* {@link #intBitsToFloat(int)} method, will produce a floating-point
|
|
490
|
-
* value the same as the argument to {@code floatToIntBits}
|
|
491
|
-
* (except all NaN values are collapsed to a single
|
|
492
|
-
* "canonical" NaN value).
|
|
493
|
-
* @param value a floating-point number.
|
|
494
|
-
* @return the bits that represent the floating-point number.
|
|
495
|
-
*/
|
|
496
|
-
floatToIntBits(value: number): number;
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Returns a representation of the specified floating-point value
|
|
500
|
-
* according to the IEEE 754 floating-point "single format" bit
|
|
501
|
-
* layout, preserving Not-a-Number (NaN) values.
|
|
502
|
-
*
|
|
503
|
-
* <p>Bit 31 (the bit that is selected by the mask
|
|
504
|
-
* {@code 0x80000000}) represents the sign of the floating-point
|
|
505
|
-
* number.
|
|
506
|
-
* Bits 30-23 (the bits that are selected by the mask
|
|
507
|
-
* {@code 0x7f800000}) represent the exponent.
|
|
508
|
-
* Bits 22-0 (the bits that are selected by the mask
|
|
509
|
-
* {@code 0x007fffff}) represent the significand (sometimes called
|
|
510
|
-
* the mantissa) of the floating-point number.
|
|
511
|
-
*
|
|
512
|
-
* <p>If the argument is positive infinity, the result is
|
|
513
|
-
* {@code 0x7f800000}.
|
|
514
|
-
*
|
|
515
|
-
* <p>If the argument is negative infinity, the result is
|
|
516
|
-
* {@code 0xff800000}.
|
|
517
|
-
*
|
|
518
|
-
* <p>If the argument is NaN, the result is the integer representing
|
|
519
|
-
* the actual NaN value. Unlike the {@code floatToIntBits}
|
|
520
|
-
* method, {@code floatToRawIntBits} does not collapse all the
|
|
521
|
-
* bit patterns encoding a NaN to a single "canonical"
|
|
522
|
-
* NaN value.
|
|
523
|
-
*
|
|
524
|
-
* <p>In all cases, the result is an integer that, when given to the
|
|
525
|
-
* {@link #intBitsToFloat(int)} method, will produce a
|
|
526
|
-
* floating-point value the same as the argument to
|
|
527
|
-
* {@code floatToRawIntBits}.
|
|
528
|
-
* @param value a floating-point number.
|
|
529
|
-
* @return the bits that represent the floating-point number.
|
|
530
|
-
* @since 1.3
|
|
531
|
-
*/
|
|
532
|
-
floatToRawIntBits(value: number): number;
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Returns the {@code float} value corresponding to a given
|
|
536
|
-
* bit representation.
|
|
537
|
-
* The argument is considered to be a representation of a
|
|
538
|
-
* floating-point value according to the IEEE 754 floating-point
|
|
539
|
-
* "single format" bit layout.
|
|
540
|
-
*
|
|
541
|
-
* <p>If the argument is {@code 0x7f800000}, the result is positive
|
|
542
|
-
* infinity.
|
|
543
|
-
*
|
|
544
|
-
* <p>If the argument is {@code 0xff800000}, the result is negative
|
|
545
|
-
* infinity.
|
|
546
|
-
*
|
|
547
|
-
* <p>If the argument is any value in the range
|
|
548
|
-
* {@code 0x7f800001} through {@code 0x7fffffff} or in
|
|
549
|
-
* the range {@code 0xff800001} through
|
|
550
|
-
* {@code 0xffffffff}, the result is a NaN. No IEEE 754
|
|
551
|
-
* floating-point operation provided by Java can distinguish
|
|
552
|
-
* between two NaN values of the same type with different bit
|
|
553
|
-
* patterns. Distinct values of NaN are only distinguishable by
|
|
554
|
-
* use of the {@code Float.floatToRawIntBits} method.
|
|
555
|
-
*
|
|
556
|
-
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
|
|
557
|
-
* values that can be computed from the argument:
|
|
558
|
-
*
|
|
559
|
-
* <blockquote><pre>{@code
|
|
560
|
-
* int s = ((bits >> 31) == 0) ? 1 : -1;
|
|
561
|
-
* int e = ((bits >> 23) & 0xff);
|
|
562
|
-
* int m = (e == 0) ?
|
|
563
|
-
* (bits & 0x7fffff) << 1 :
|
|
564
|
-
* (bits & 0x7fffff) | 0x800000;
|
|
565
|
-
* }</pre></blockquote>
|
|
566
|
-
*
|
|
567
|
-
* Then the floating-point result equals the value of the mathematical
|
|
568
|
-
* expression <i>s</i>·<i>m</i>·2<sup><i>e</i>-150</sup>.
|
|
569
|
-
*
|
|
570
|
-
* <p>Note that this method may not be able to return a
|
|
571
|
-
* {@code float} NaN with exactly same bit pattern as the
|
|
572
|
-
* {@code int} argument. IEEE 754 distinguishes between two
|
|
573
|
-
* kinds of NaNs, quiet NaNs and <i>signaling NaNs</i>. The
|
|
574
|
-
* differences between the two kinds of NaN are generally not
|
|
575
|
-
* visible in Java. Arithmetic operations on signaling NaNs turn
|
|
576
|
-
* them into quiet NaNs with a different, but often similar, bit
|
|
577
|
-
* pattern. However, on some processors merely copying a
|
|
578
|
-
* signaling NaN also performs that conversion. In particular,
|
|
579
|
-
* copying a signaling NaN to return it to the calling method may
|
|
580
|
-
* perform this conversion. So {@code intBitsToFloat} may
|
|
581
|
-
* not be able to return a {@code float} with a signaling NaN
|
|
582
|
-
* bit pattern. Consequently, for some {@code int} values,
|
|
583
|
-
* {@code floatToRawIntBits(intBitsToFloat(start))} may
|
|
584
|
-
* <i>not</i> equal {@code start}. Moreover, which
|
|
585
|
-
* particular bit patterns represent signaling NaNs is platform
|
|
586
|
-
* dependent; although all NaN bit patterns, quiet or signaling,
|
|
587
|
-
* must be in the NaN range identified above.
|
|
588
|
-
* @param bits an integer.
|
|
589
|
-
* @return the {@code float} floating-point value with the same bit
 pattern.
|
|
590
|
-
*/
|
|
591
|
-
intBitsToFloat(bits: number): number;
|
|
592
|
-
|
|
593
146
|
/**
|
|
594
147
|
* Compares two {@code Float} objects numerically. There are
|
|
595
148
|
* two ways in which comparisons performed by this method differ
|
|
@@ -616,53 +169,6 @@ export type Float = Number &
|
|
|
616
169
|
*/
|
|
617
170
|
compareTo(anotherFloat: Float | number): number;
|
|
618
171
|
|
|
619
|
-
/**
|
|
620
|
-
* Compares the two specified {@code float} values. The sign
|
|
621
|
-
* of the integer value returned is the same as that of the
|
|
622
|
-
* integer that would be returned by the call:
|
|
623
|
-
* <pre>
|
|
624
|
-
* new Float(f1).compareTo(new Float(f2))
|
|
625
|
-
* </pre>
|
|
626
|
-
* @param f1 the first {@code float} to compare.
|
|
627
|
-
* @param f2 the second {@code float} to compare.
|
|
628
|
-
* @return the value {@code 0} if {@code f1} is
 numerically equal to {@code f2}; a value less than
 {@code 0} if {@code f1} is numerically less than
 {@code f2}; and a value greater than {@code 0}
 if {@code f1} is numerically greater than
 {@code f2}.
|
|
629
|
-
* @since 1.4
|
|
630
|
-
*/
|
|
631
|
-
compare(f1: number, f2: number): number;
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* Adds two {@code float} values together as per the + operator.
|
|
635
|
-
* @param a the first operand
|
|
636
|
-
* @param b the second operand
|
|
637
|
-
* @return the sum of {@code a} and {@code b}
|
|
638
|
-
* @jls 4.2.4 Floating-Point Operations
|
|
639
|
-
* @see java.util.function.BinaryOperator
|
|
640
|
-
* @since 1.8
|
|
641
|
-
*/
|
|
642
|
-
sum(a: number, b: number): number;
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* Returns the greater of two {@code float} values
|
|
646
|
-
* as if by calling {@link Math#max(float, float) Math.max}.
|
|
647
|
-
* @param a the first operand
|
|
648
|
-
* @param b the second operand
|
|
649
|
-
* @return the greater of {@code a} and {@code b}
|
|
650
|
-
* @see java.util.function.BinaryOperator
|
|
651
|
-
* @since 1.8
|
|
652
|
-
*/
|
|
653
|
-
max(a: number, b: number): number;
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* Returns the smaller of two {@code float} values
|
|
657
|
-
* as if by calling {@link Math#min(float, float) Math.min}.
|
|
658
|
-
* @param a the first operand
|
|
659
|
-
* @param b the second operand
|
|
660
|
-
* @return the smaller of {@code a} and {@code b}
|
|
661
|
-
* @see java.util.function.BinaryOperator
|
|
662
|
-
* @since 1.8
|
|
663
|
-
*/
|
|
664
|
-
min(a: number, b: number): number;
|
|
665
|
-
|
|
666
172
|
/**
|
|
667
173
|
* A constant holding the positive infinity of type
|
|
668
174
|
* {@code float}. 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
|
-
parseFloat: function parseFloat() {},
|
|
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
|
-
floatToRawIntBits: function floatToRawIntBits() {},
|
|
25
|
-
intBitsToFloat: function intBitsToFloat() {},
|
|
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;
|