@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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { String } from "../String";
|
|
2
|
-
|
|
3
2
|
import type { Object } from "../Object";
|
|
4
3
|
|
|
5
4
|
import type { Number } from "../Number";
|
|
@@ -29,452 +28,6 @@ import type { Class } from "../Class";
|
|
|
29
28
|
*/
|
|
30
29
|
export type Long = Number &
|
|
31
30
|
Comparable & {
|
|
32
|
-
/**
|
|
33
|
-
* Returns a string representation of the first argument in the
|
|
34
|
-
* radix specified by the second argument.
|
|
35
|
-
*
|
|
36
|
-
* <p>If the radix is smaller than {@code Character.MIN_RADIX}
|
|
37
|
-
* or larger than {@code Character.MAX_RADIX}, then the radix
|
|
38
|
-
* {@code 10} is used instead.
|
|
39
|
-
*
|
|
40
|
-
* <p>If the first argument is negative, the first element of the
|
|
41
|
-
* result is the ASCII minus sign {@code '-'}
|
|
42
|
-
* ({@code '\u002d'}). If the first argument is not
|
|
43
|
-
* negative, no sign character appears in the result.
|
|
44
|
-
*
|
|
45
|
-
* <p>The remaining characters of the result represent the magnitude
|
|
46
|
-
* of the first argument. If the magnitude is zero, it is
|
|
47
|
-
* represented by a single zero character {@code '0'}
|
|
48
|
-
* ({@code '\u0030'}); otherwise, the first character of
|
|
49
|
-
* the representation of the magnitude will not be the zero
|
|
50
|
-
* character. The following ASCII characters are used as digits:
|
|
51
|
-
*
|
|
52
|
-
* <blockquote>
|
|
53
|
-
* {@code 0123456789abcdefghijklmnopqrstuvwxyz}
|
|
54
|
-
* </blockquote>
|
|
55
|
-
*
|
|
56
|
-
* These are {@code '\u0030'} through
|
|
57
|
-
* {@code '\u0039'} and {@code '\u0061'} through
|
|
58
|
-
* {@code '\u007a'}. If {@code radix} is
|
|
59
|
-
* <var>N</var>, then the first <var>N</var> of these characters
|
|
60
|
-
* are used as radix-<var>N</var> digits in the order shown. Thus,
|
|
61
|
-
* the digits for hexadecimal (radix 16) are
|
|
62
|
-
* {@code 0123456789abcdef}. If uppercase letters are
|
|
63
|
-
* desired, the {@link java.lang.String#toUpperCase()} method may
|
|
64
|
-
* be called on the result:
|
|
65
|
-
*
|
|
66
|
-
* <blockquote>
|
|
67
|
-
* {@code Long.toString(n, 16).toUpperCase()}
|
|
68
|
-
* </blockquote>
|
|
69
|
-
* @param i a {@code long} to be converted to a string.
|
|
70
|
-
* @param radix the radix to use in the string representation.
|
|
71
|
-
* @return a string representation of the argument in the specified radix.
|
|
72
|
-
* @see java.lang.Character#MAX_RADIX
|
|
73
|
-
* @see java.lang.Character#MIN_RADIX
|
|
74
|
-
*/
|
|
75
|
-
toString(i: number, radix: number): string;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Returns a string representation of the first argument as an
|
|
79
|
-
* unsigned integer value in the radix specified by the second
|
|
80
|
-
* argument.
|
|
81
|
-
*
|
|
82
|
-
* <p>If the radix is smaller than {@code Character.MIN_RADIX}
|
|
83
|
-
* or larger than {@code Character.MAX_RADIX}, then the radix
|
|
84
|
-
* {@code 10} is used instead.
|
|
85
|
-
*
|
|
86
|
-
* <p>Note that since the first argument is treated as an unsigned
|
|
87
|
-
* value, no leading sign character is printed.
|
|
88
|
-
*
|
|
89
|
-
* <p>If the magnitude is zero, it is represented by a single zero
|
|
90
|
-
* character {@code '0'} ({@code '\u0030'}); otherwise,
|
|
91
|
-
* the first character of the representation of the magnitude will
|
|
92
|
-
* not be the zero character.
|
|
93
|
-
*
|
|
94
|
-
* <p>The behavior of radixes and the characters used as digits
|
|
95
|
-
* are the same as {@link #toString(long, int) toString}.
|
|
96
|
-
* @param i an integer to be converted to an unsigned string.
|
|
97
|
-
* @param radix the radix to use in the string representation.
|
|
98
|
-
* @return an unsigned string representation of the argument in the specified radix.
|
|
99
|
-
* @see #toString(long, int)
|
|
100
|
-
* @since 1.8
|
|
101
|
-
*/
|
|
102
|
-
toUnsignedString(i: number, radix: number): string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Returns a string representation of the {@code long}
|
|
106
|
-
* argument as an unsigned integer in base 16.
|
|
107
|
-
*
|
|
108
|
-
* <p>The unsigned {@code long} value is the argument plus
|
|
109
|
-
* 2<sup>64</sup> if the argument is negative; otherwise, it is
|
|
110
|
-
* equal to the argument. This value is converted to a string of
|
|
111
|
-
* ASCII digits in hexadecimal (base 16) with no extra
|
|
112
|
-
* leading {@code 0}s.
|
|
113
|
-
*
|
|
114
|
-
* <p>The value of the argument can be recovered from the returned
|
|
115
|
-
* string {@code s} by calling {@link
|
|
116
|
-
* Long#parseUnsignedLong(String, int) Long.parseUnsignedLong(s,
|
|
117
|
-
* 16)}.
|
|
118
|
-
*
|
|
119
|
-
* <p>If the unsigned magnitude is zero, it is represented by a
|
|
120
|
-
* single zero character {@code '0'} ({@code '\u0030'});
|
|
121
|
-
* otherwise, the first character of the representation of the
|
|
122
|
-
* unsigned magnitude will not be the zero character. The
|
|
123
|
-
* following characters are used as hexadecimal digits:
|
|
124
|
-
*
|
|
125
|
-
* <blockquote>
|
|
126
|
-
* {@code 0123456789abcdef}
|
|
127
|
-
* </blockquote>
|
|
128
|
-
*
|
|
129
|
-
* These are the characters {@code '\u0030'} through
|
|
130
|
-
* {@code '\u0039'} and {@code '\u0061'} through
|
|
131
|
-
* {@code '\u0066'}. If uppercase letters are desired,
|
|
132
|
-
* the {@link java.lang.String#toUpperCase()} method may be called
|
|
133
|
-
* on the result:
|
|
134
|
-
*
|
|
135
|
-
* <blockquote>
|
|
136
|
-
* {@code Long.toHexString(n).toUpperCase()}
|
|
137
|
-
* </blockquote>
|
|
138
|
-
* @param i a {@code long} to be converted to a string.
|
|
139
|
-
* @return the string representation of the unsigned {@code long}
 value represented by the argument in hexadecimal
 (base 16).
|
|
140
|
-
* @see #parseUnsignedLong(String, int)
|
|
141
|
-
* @see #toUnsignedString(long, int)
|
|
142
|
-
* @since JDK 1.0.2
|
|
143
|
-
*/
|
|
144
|
-
toHexString(i: number): string;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Returns a string representation of the {@code long}
|
|
148
|
-
* argument as an unsigned integer in base 8.
|
|
149
|
-
*
|
|
150
|
-
* <p>The unsigned {@code long} value is the argument plus
|
|
151
|
-
* 2<sup>64</sup> if the argument is negative; otherwise, it is
|
|
152
|
-
* equal to the argument. This value is converted to a string of
|
|
153
|
-
* ASCII digits in octal (base 8) with no extra leading
|
|
154
|
-
* {@code 0}s.
|
|
155
|
-
*
|
|
156
|
-
* <p>The value of the argument can be recovered from the returned
|
|
157
|
-
* string {@code s} by calling {@link
|
|
158
|
-
* Long#parseUnsignedLong(String, int) Long.parseUnsignedLong(s,
|
|
159
|
-
* 8)}.
|
|
160
|
-
*
|
|
161
|
-
* <p>If the unsigned magnitude is zero, it is represented by a
|
|
162
|
-
* single zero character {@code '0'} ({@code '\u0030'});
|
|
163
|
-
* otherwise, the first character of the representation of the
|
|
164
|
-
* unsigned magnitude will not be the zero character. The
|
|
165
|
-
* following characters are used as octal digits:
|
|
166
|
-
*
|
|
167
|
-
* <blockquote>
|
|
168
|
-
* {@code 01234567}
|
|
169
|
-
* </blockquote>
|
|
170
|
-
*
|
|
171
|
-
* These are the characters {@code '\u0030'} through
|
|
172
|
-
* {@code '\u0037'}.
|
|
173
|
-
* @param i a {@code long} to be converted to a string.
|
|
174
|
-
* @return the string representation of the unsigned {@code long}
 value represented by the argument in octal (base 8).
|
|
175
|
-
* @see #parseUnsignedLong(String, int)
|
|
176
|
-
* @see #toUnsignedString(long, int)
|
|
177
|
-
* @since JDK 1.0.2
|
|
178
|
-
*/
|
|
179
|
-
toOctalString(i: number): string;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Returns a string representation of the {@code long}
|
|
183
|
-
* argument as an unsigned integer in base 2.
|
|
184
|
-
*
|
|
185
|
-
* <p>The unsigned {@code long} value is the argument plus
|
|
186
|
-
* 2<sup>64</sup> if the argument is negative; otherwise, it is
|
|
187
|
-
* equal to the argument. This value is converted to a string of
|
|
188
|
-
* ASCII digits in binary (base 2) with no extra leading
|
|
189
|
-
* {@code 0}s.
|
|
190
|
-
*
|
|
191
|
-
* <p>The value of the argument can be recovered from the returned
|
|
192
|
-
* string {@code s} by calling {@link
|
|
193
|
-
* Long#parseUnsignedLong(String, int) Long.parseUnsignedLong(s,
|
|
194
|
-
* 2)}.
|
|
195
|
-
*
|
|
196
|
-
* <p>If the unsigned magnitude is zero, it is represented by a
|
|
197
|
-
* single zero character {@code '0'} ({@code '\u0030'});
|
|
198
|
-
* otherwise, the first character of the representation of the
|
|
199
|
-
* unsigned magnitude will not be the zero character. The
|
|
200
|
-
* characters {@code '0'} ({@code '\u0030'}) and {@code
|
|
201
|
-
* '1'} ({@code '\u0031'}) are used as binary digits.
|
|
202
|
-
* @param i a {@code long} to be converted to a string.
|
|
203
|
-
* @return the string representation of the unsigned {@code long}
 value represented by the argument in binary (base 2).
|
|
204
|
-
* @see #parseUnsignedLong(String, int)
|
|
205
|
-
* @see #toUnsignedString(long, int)
|
|
206
|
-
* @since JDK 1.0.2
|
|
207
|
-
*/
|
|
208
|
-
toBinaryString(i: number): string;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Returns a {@code String} object representing the specified
|
|
212
|
-
* {@code long}. The argument is converted to signed decimal
|
|
213
|
-
* representation and returned as a string, exactly as if the
|
|
214
|
-
* argument and the radix 10 were given as arguments to the {@link
|
|
215
|
-
* #toString(long, int)} method.
|
|
216
|
-
* @param i a {@code long} to be converted.
|
|
217
|
-
* @return a string representation of the argument in base 10.
|
|
218
|
-
*/
|
|
219
|
-
toString(i: number): string;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Returns a string representation of the argument as an unsigned
|
|
223
|
-
* decimal value.
|
|
224
|
-
*
|
|
225
|
-
* The argument is converted to unsigned decimal representation
|
|
226
|
-
* and returned as a string exactly as if the argument and radix
|
|
227
|
-
* 10 were given as arguments to the {@link #toUnsignedString(long,
|
|
228
|
-
* int)} method.
|
|
229
|
-
* @param i an integer to be converted to an unsigned string.
|
|
230
|
-
* @return an unsigned string representation of the argument.
|
|
231
|
-
* @see #toUnsignedString(long, int)
|
|
232
|
-
* @since 1.8
|
|
233
|
-
*/
|
|
234
|
-
toUnsignedString(i: number): string;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Parses the string argument as a signed {@code long} in the
|
|
238
|
-
* radix specified by the second argument. The characters in the
|
|
239
|
-
* string must all be digits of the specified radix (as determined
|
|
240
|
-
* by whether {@link java.lang.Character#digit(char, int)} returns
|
|
241
|
-
* a nonnegative value), except that the first character may be an
|
|
242
|
-
* ASCII minus sign {@code '-'} ({@code '\u002D'}) to
|
|
243
|
-
* indicate a negative value or an ASCII plus sign {@code '+'}
|
|
244
|
-
* ({@code '\u002B'}) to indicate a positive value. The
|
|
245
|
-
* resulting {@code long} value is returned.
|
|
246
|
-
*
|
|
247
|
-
* <p>Note that neither the character {@code L}
|
|
248
|
-
* ({@code '\u004C'}) nor {@code l}
|
|
249
|
-
* ({@code '\u006C'}) is permitted to appear at the end
|
|
250
|
-
* of the string as a type indicator, as would be permitted in
|
|
251
|
-
* Java programming language source code - except that either
|
|
252
|
-
* {@code L} or {@code l} may appear as a digit for a
|
|
253
|
-
* radix greater than or equal to 22.
|
|
254
|
-
*
|
|
255
|
-
* <p>An exception of type {@code NumberFormatException} is
|
|
256
|
-
* thrown if any of the following situations occurs:
|
|
257
|
-
* <ul>
|
|
258
|
-
*
|
|
259
|
-
* <li>The first argument is {@code null} or is a string of
|
|
260
|
-
* length zero.
|
|
261
|
-
*
|
|
262
|
-
* <li>The {@code radix} is either smaller than {@link
|
|
263
|
-
* java.lang.Character#MIN_RADIX} or larger than {@link
|
|
264
|
-
* java.lang.Character#MAX_RADIX}.
|
|
265
|
-
*
|
|
266
|
-
* <li>Any character of the string is not a digit of the specified
|
|
267
|
-
* radix, except that the first character may be a minus sign
|
|
268
|
-
* {@code '-'} ({@code '\u002d'}) or plus sign {@code
|
|
269
|
-
* '+'} ({@code '\u002B'}) provided that the string is
|
|
270
|
-
* longer than length 1.
|
|
271
|
-
*
|
|
272
|
-
* <li>The value represented by the string is not a value of type
|
|
273
|
-
* {@code long}.
|
|
274
|
-
* </ul>
|
|
275
|
-
*
|
|
276
|
-
* <p>Examples:
|
|
277
|
-
* <blockquote><pre>
|
|
278
|
-
* parseLong("0", 10) returns 0L
|
|
279
|
-
* parseLong("473", 10) returns 473L
|
|
280
|
-
* parseLong("+42", 10) returns 42L
|
|
281
|
-
* parseLong("-0", 10) returns 0L
|
|
282
|
-
* parseLong("-FF", 16) returns -255L
|
|
283
|
-
* parseLong("1100110", 2) returns 102L
|
|
284
|
-
* parseLong("99", 8) throws a NumberFormatException
|
|
285
|
-
* parseLong("Hazelnut", 10) throws a NumberFormatException
|
|
286
|
-
* parseLong("Hazelnut", 36) returns 1356099454469L
|
|
287
|
-
* </pre></blockquote>
|
|
288
|
-
* @param s the {@code String} containing the
 {@code long} representation to be parsed.
|
|
289
|
-
* @param radix the radix to be used while parsing {@code s}.
|
|
290
|
-
* @return the {@code long} represented by the string argument in
 the specified radix.
|
|
291
|
-
* @throws NumberFormatException if the string does not contain a
 parsable {@code long}.
|
|
292
|
-
*/
|
|
293
|
-
parseLong(s: String | string, radix: number): number;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Parses the string argument as a signed decimal {@code long}.
|
|
297
|
-
* The characters in the string must all be decimal digits, except
|
|
298
|
-
* that the first character may be an ASCII minus sign {@code '-'}
|
|
299
|
-
* ({@code \u002D'}) to indicate a negative value or an
|
|
300
|
-
* ASCII plus sign {@code '+'} ({@code '\u002B'}) to
|
|
301
|
-
* indicate a positive value. The resulting {@code long} value is
|
|
302
|
-
* returned, exactly as if the argument and the radix {@code 10}
|
|
303
|
-
* were given as arguments to the {@link
|
|
304
|
-
* #parseLong(java.lang.String, int)} method.
|
|
305
|
-
*
|
|
306
|
-
* <p>Note that neither the character {@code L}
|
|
307
|
-
* ({@code '\u004C'}) nor {@code l}
|
|
308
|
-
* ({@code '\u006C'}) is permitted to appear at the end
|
|
309
|
-
* of the string as a type indicator, as would be permitted in
|
|
310
|
-
* Java programming language source code.
|
|
311
|
-
* @param s a {@code String} containing the {@code long}
 representation to be parsed
|
|
312
|
-
* @return the {@code long} represented by the argument in
 decimal.
|
|
313
|
-
* @throws NumberFormatException if the string does not contain a
 parsable {@code long}.
|
|
314
|
-
*/
|
|
315
|
-
parseLong(s: String | string): number;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Parses the string argument as an unsigned {@code long} in the
|
|
319
|
-
* radix specified by the second argument. An unsigned integer
|
|
320
|
-
* maps the values usually associated with negative numbers to
|
|
321
|
-
* positive numbers larger than {@code MAX_VALUE}.
|
|
322
|
-
*
|
|
323
|
-
* The characters in the string must all be digits of the
|
|
324
|
-
* specified radix (as determined by whether {@link
|
|
325
|
-
* java.lang.Character#digit(char, int)} returns a nonnegative
|
|
326
|
-
* value), except that the first character may be an ASCII plus
|
|
327
|
-
* sign {@code '+'} ({@code '\u002B'}). The resulting
|
|
328
|
-
* integer value is returned.
|
|
329
|
-
*
|
|
330
|
-
* <p>An exception of type {@code NumberFormatException} is
|
|
331
|
-
* thrown if any of the following situations occurs:
|
|
332
|
-
* <ul>
|
|
333
|
-
* <li>The first argument is {@code null} or is a string of
|
|
334
|
-
* length zero.
|
|
335
|
-
*
|
|
336
|
-
* <li>The radix is either smaller than
|
|
337
|
-
* {@link java.lang.Character#MIN_RADIX} or
|
|
338
|
-
* larger than {@link java.lang.Character#MAX_RADIX}.
|
|
339
|
-
*
|
|
340
|
-
* <li>Any character of the string is not a digit of the specified
|
|
341
|
-
* radix, except that the first character may be a plus sign
|
|
342
|
-
* {@code '+'} ({@code '\u002B'}) provided that the
|
|
343
|
-
* string is longer than length 1.
|
|
344
|
-
*
|
|
345
|
-
* <li>The value represented by the string is larger than the
|
|
346
|
-
* largest unsigned {@code long}, 2<sup>64</sup>-1.
|
|
347
|
-
*
|
|
348
|
-
* </ul>
|
|
349
|
-
* @param s the {@code String} containing the unsigned integer
 representation to be parsed
|
|
350
|
-
* @param radix the radix to be used while parsing {@code s}.
|
|
351
|
-
* @return the unsigned {@code long} represented by the string
 argument in the specified radix.
|
|
352
|
-
* @throws NumberFormatException if the {@code String}
 does not contain a parsable {@code long}.
|
|
353
|
-
* @since 1.8
|
|
354
|
-
*/
|
|
355
|
-
parseUnsignedLong(s: String | string, radix: number): number;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Parses the string argument as an unsigned decimal {@code long}. The
|
|
359
|
-
* characters in the string must all be decimal digits, except
|
|
360
|
-
* that the first character may be an an ASCII plus sign {@code
|
|
361
|
-
* '+'} ({@code '\u002B'}). The resulting integer value
|
|
362
|
-
* is returned, exactly as if the argument and the radix 10 were
|
|
363
|
-
* given as arguments to the {@link
|
|
364
|
-
* #parseUnsignedLong(java.lang.String, int)} method.
|
|
365
|
-
* @param s a {@code String} containing the unsigned {@code long}
 representation to be parsed
|
|
366
|
-
* @return the unsigned {@code long} value represented by the decimal string argument
|
|
367
|
-
* @throws NumberFormatException if the string does not contain a
 parsable unsigned integer.
|
|
368
|
-
* @since 1.8
|
|
369
|
-
*/
|
|
370
|
-
parseUnsignedLong(s: String | string): number;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Returns a {@code Long} object holding the value
|
|
374
|
-
* extracted from the specified {@code String} when parsed
|
|
375
|
-
* with the radix given by the second argument. The first
|
|
376
|
-
* argument is interpreted as representing a signed
|
|
377
|
-
* {@code long} in the radix specified by the second
|
|
378
|
-
* argument, exactly as if the arguments were given to the {@link
|
|
379
|
-
* #parseLong(java.lang.String, int)} method. The result is a
|
|
380
|
-
* {@code Long} object that represents the {@code long}
|
|
381
|
-
* value specified by the string.
|
|
382
|
-
*
|
|
383
|
-
* <p>In other words, this method returns a {@code Long} object equal
|
|
384
|
-
* to the value of:
|
|
385
|
-
*
|
|
386
|
-
* <blockquote>
|
|
387
|
-
* {@code new Long(Long.parseLong(s, radix))}
|
|
388
|
-
* </blockquote>
|
|
389
|
-
* @param s the string to be parsed
|
|
390
|
-
* @param radix the radix to be used in interpreting {@code s}
|
|
391
|
-
* @return a {@code Long} object holding the value
 represented by the string argument in the specified
 radix.
|
|
392
|
-
* @throws NumberFormatException If the {@code String} does not
 contain a parsable {@code long}.
|
|
393
|
-
*/
|
|
394
|
-
valueOf(s: String | string, radix: number): number;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Returns a {@code Long} object holding the value
|
|
398
|
-
* of the specified {@code String}. The argument is
|
|
399
|
-
* interpreted as representing a signed decimal {@code long},
|
|
400
|
-
* exactly as if the argument were given to the {@link
|
|
401
|
-
* #parseLong(java.lang.String)} method. The result is a
|
|
402
|
-
* {@code Long} object that represents the integer value
|
|
403
|
-
* specified by the string.
|
|
404
|
-
*
|
|
405
|
-
* <p>In other words, this method returns a {@code Long} object
|
|
406
|
-
* equal to the value of:
|
|
407
|
-
*
|
|
408
|
-
* <blockquote>
|
|
409
|
-
* {@code new Long(Long.parseLong(s))}
|
|
410
|
-
* </blockquote>
|
|
411
|
-
* @param s the string to be parsed.
|
|
412
|
-
* @return a {@code Long} object holding the value
 represented by the string argument.
|
|
413
|
-
* @throws NumberFormatException If the string cannot be parsed
 as a {@code long}.
|
|
414
|
-
*/
|
|
415
|
-
valueOf(s: String | string): number;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Returns a {@code Long} instance representing the specified
|
|
419
|
-
* {@code long} value.
|
|
420
|
-
* If a new {@code Long} instance is not required, this method
|
|
421
|
-
* should generally be used in preference to the constructor
|
|
422
|
-
* {@link #Long(long)}, as this method is likely to yield
|
|
423
|
-
* significantly better space and time performance by caching
|
|
424
|
-
* frequently requested values.
|
|
425
|
-
*
|
|
426
|
-
* Note that unlike the {@linkplain Integer#valueOf(int)
|
|
427
|
-
* corresponding method} in the {@code Integer} class, this method
|
|
428
|
-
* is <em>not</em> required to cache values within a particular
|
|
429
|
-
* range.
|
|
430
|
-
* @param l a long value.
|
|
431
|
-
* @return a {@code Long} instance representing {@code l}.
|
|
432
|
-
* @since 1.5
|
|
433
|
-
*/
|
|
434
|
-
valueOf(l: number): number;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Decodes a {@code String} into a {@code Long}.
|
|
438
|
-
* Accepts decimal, hexadecimal, and octal numbers given by the
|
|
439
|
-
* following grammar:
|
|
440
|
-
*
|
|
441
|
-
* <blockquote>
|
|
442
|
-
* <dl>
|
|
443
|
-
* <dt><i>DecodableString:</i>
|
|
444
|
-
* <dd><i>Sign<sub>opt</sub> DecimalNumeral</i>
|
|
445
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code 0x} <i>HexDigits</i>
|
|
446
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code 0X} <i>HexDigits</i>
|
|
447
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code #} <i>HexDigits</i>
|
|
448
|
-
* <dd><i>Sign<sub>opt</sub></i> {@code 0} <i>OctalDigits</i>
|
|
449
|
-
*
|
|
450
|
-
* <dt><i>Sign:</i>
|
|
451
|
-
* <dd>{@code -}
|
|
452
|
-
* <dd>{@code +}
|
|
453
|
-
* </dl>
|
|
454
|
-
* </blockquote>
|
|
455
|
-
*
|
|
456
|
-
* <i>DecimalNumeral</i>, <i>HexDigits</i>, and <i>OctalDigits</i>
|
|
457
|
-
* are as defined in section 3.10.1 of
|
|
458
|
-
* <cite>The Java™ Language Specification</cite>,
|
|
459
|
-
* except that underscores are not accepted between digits.
|
|
460
|
-
*
|
|
461
|
-
* <p>The sequence of characters following an optional
|
|
462
|
-
* sign and/or radix specifier ("{@code 0x}", "{@code 0X}",
|
|
463
|
-
* "{@code #}", or leading zero) is parsed as by the {@code
|
|
464
|
-
* Long.parseLong} method with the indicated radix (10, 16, or 8).
|
|
465
|
-
* This sequence of characters must represent a positive value or
|
|
466
|
-
* a {@link NumberFormatException} will be thrown. The result is
|
|
467
|
-
* negated if first character of the specified {@code String} is
|
|
468
|
-
* the minus sign. No whitespace characters are permitted in the
|
|
469
|
-
* {@code String}.
|
|
470
|
-
* @param nm the {@code String} to decode.
|
|
471
|
-
* @return a {@code Long} object holding the {@code long}
 value represented by {@code nm}
|
|
472
|
-
* @throws NumberFormatException if the {@code String} does not
 contain a parsable {@code long}.
|
|
473
|
-
* @see java.lang.Long#parseLong(String, int)
|
|
474
|
-
* @since 1.2
|
|
475
|
-
*/
|
|
476
|
-
decode(nm: String | string): number;
|
|
477
|
-
|
|
478
31
|
/**
|
|
479
32
|
* Returns the value of this {@code Long} as a {@code byte} after
|
|
480
33
|
* a narrowing primitive conversion.
|
|
@@ -540,15 +93,6 @@ export type Long = Number &
|
|
|
540
93
|
*/
|
|
541
94
|
hashCode(): number;
|
|
542
95
|
|
|
543
|
-
/**
|
|
544
|
-
* Returns a hash code for a {@code long} value; compatible with
|
|
545
|
-
* {@code Long.hashCode()}.
|
|
546
|
-
* @param value the value to hash
|
|
547
|
-
* @return a hash code value for a {@code long} value.
|
|
548
|
-
* @since 1.8
|
|
549
|
-
*/
|
|
550
|
-
hashCode(value: number): number;
|
|
551
|
-
|
|
552
96
|
/**
|
|
553
97
|
* Compares this object to the specified object. The result is
|
|
554
98
|
* {@code true} if and only if the argument is not
|
|
@@ -559,121 +103,6 @@ export type Long = Number &
|
|
|
559
103
|
*/
|
|
560
104
|
equals(obj: unknown): boolean;
|
|
561
105
|
|
|
562
|
-
/**
|
|
563
|
-
* Determines the {@code long} value of the system property
|
|
564
|
-
* with the specified name.
|
|
565
|
-
*
|
|
566
|
-
* <p>The first argument is treated as the name of a system
|
|
567
|
-
* property. System properties are accessible through the {@link
|
|
568
|
-
* java.lang.System#getProperty(java.lang.String)} method. The
|
|
569
|
-
* string value of this property is then interpreted as a {@code
|
|
570
|
-
* long} value using the grammar supported by {@link Long#decode decode}
|
|
571
|
-
* and a {@code Long} object representing this value is returned.
|
|
572
|
-
*
|
|
573
|
-
* <p>If there is no property with the specified name, if the
|
|
574
|
-
* specified name is empty or {@code null}, or if the property
|
|
575
|
-
* does not have the correct numeric format, then {@code null} is
|
|
576
|
-
* returned.
|
|
577
|
-
*
|
|
578
|
-
* <p>In other words, this method returns a {@code Long} object
|
|
579
|
-
* equal to the value of:
|
|
580
|
-
*
|
|
581
|
-
* <blockquote>
|
|
582
|
-
* {@code getLong(nm, null)}
|
|
583
|
-
* </blockquote>
|
|
584
|
-
* @param nm property name.
|
|
585
|
-
* @return the {@code Long} value of the property.
|
|
586
|
-
* @throws SecurityException for the same reasons as
 {@link System#getProperty(String) System.getProperty}
|
|
587
|
-
* @see java.lang.System#getProperty(java.lang.String)
|
|
588
|
-
* @see java.lang.System#getProperty(java.lang.String, java.lang.String)
|
|
589
|
-
*/
|
|
590
|
-
getLong(nm: String | string): number;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Determines the {@code long} value of the system property
|
|
594
|
-
* with the specified name.
|
|
595
|
-
*
|
|
596
|
-
* <p>The first argument is treated as the name of a system
|
|
597
|
-
* property. System properties are accessible through the {@link
|
|
598
|
-
* java.lang.System#getProperty(java.lang.String)} method. The
|
|
599
|
-
* string value of this property is then interpreted as a {@code
|
|
600
|
-
* long} value using the grammar supported by {@link Long#decode decode}
|
|
601
|
-
* and a {@code Long} object representing this value is returned.
|
|
602
|
-
*
|
|
603
|
-
* <p>The second argument is the default value. A {@code Long} object
|
|
604
|
-
* that represents the value of the second argument is returned if there
|
|
605
|
-
* is no property of the specified name, if the property does not have
|
|
606
|
-
* the correct numeric format, or if the specified name is empty or null.
|
|
607
|
-
*
|
|
608
|
-
* <p>In other words, this method returns a {@code Long} object equal
|
|
609
|
-
* to the value of:
|
|
610
|
-
*
|
|
611
|
-
* <blockquote>
|
|
612
|
-
* {@code getLong(nm, new Long(val))}
|
|
613
|
-
* </blockquote>
|
|
614
|
-
*
|
|
615
|
-
* but in practice it may be implemented in a manner such as:
|
|
616
|
-
*
|
|
617
|
-
* <blockquote><pre>
|
|
618
|
-
* Long result = getLong(nm, null);
|
|
619
|
-
* return (result == null) ? new Long(val) : result;
|
|
620
|
-
* </pre></blockquote>
|
|
621
|
-
*
|
|
622
|
-
* to avoid the unnecessary allocation of a {@code Long} object when
|
|
623
|
-
* the default value is not needed.
|
|
624
|
-
* @param nm property name.
|
|
625
|
-
* @param val default value.
|
|
626
|
-
* @return the {@code Long} value of the property.
|
|
627
|
-
* @throws SecurityException for the same reasons as
 {@link System#getProperty(String) System.getProperty}
|
|
628
|
-
* @see java.lang.System#getProperty(java.lang.String)
|
|
629
|
-
* @see java.lang.System#getProperty(java.lang.String, java.lang.String)
|
|
630
|
-
*/
|
|
631
|
-
getLong(nm: String | string, val: number): number;
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* Returns the {@code long} value of the system property with
|
|
635
|
-
* the specified name. The first argument is treated as the name
|
|
636
|
-
* of a system property. System properties are accessible through
|
|
637
|
-
* the {@link java.lang.System#getProperty(java.lang.String)}
|
|
638
|
-
* method. The string value of this property is then interpreted
|
|
639
|
-
* as a {@code long} value, as per the
|
|
640
|
-
* {@link Long#decode decode} method, and a {@code Long} object
|
|
641
|
-
* representing this value is returned; in summary:
|
|
642
|
-
*
|
|
643
|
-
* <ul>
|
|
644
|
-
* <li>If the property value begins with the two ASCII characters
|
|
645
|
-
* {@code 0x} or the ASCII character {@code #}, not followed by
|
|
646
|
-
* a minus sign, then the rest of it is parsed as a hexadecimal integer
|
|
647
|
-
* exactly as for the method {@link #valueOf(java.lang.String, int)}
|
|
648
|
-
* with radix 16.
|
|
649
|
-
* <li>If the property value begins with the ASCII character
|
|
650
|
-
* {@code 0} followed by another character, it is parsed as
|
|
651
|
-
* an octal integer exactly as by the method {@link
|
|
652
|
-
* #valueOf(java.lang.String, int)} with radix 8.
|
|
653
|
-
* <li>Otherwise the property value is parsed as a decimal
|
|
654
|
-
* integer exactly as by the method
|
|
655
|
-
* {@link #valueOf(java.lang.String, int)} with radix 10.
|
|
656
|
-
* </ul>
|
|
657
|
-
*
|
|
658
|
-
* <p>Note that, in every case, neither {@code L}
|
|
659
|
-
* ({@code '\u004C'}) nor {@code l}
|
|
660
|
-
* ({@code '\u006C'}) is permitted to appear at the end
|
|
661
|
-
* of the property value as a type indicator, as would be
|
|
662
|
-
* permitted in Java programming language source code.
|
|
663
|
-
*
|
|
664
|
-
* <p>The second argument is the default value. The default value is
|
|
665
|
-
* returned if there is no property of the specified name, if the
|
|
666
|
-
* property does not have the correct numeric format, or if the
|
|
667
|
-
* specified name is empty or {@code null}.
|
|
668
|
-
* @param nm property name.
|
|
669
|
-
* @param val default value.
|
|
670
|
-
* @return the {@code Long} value of the property.
|
|
671
|
-
* @throws SecurityException for the same reasons as
 {@link System#getProperty(String) System.getProperty}
|
|
672
|
-
* @see System#getProperty(java.lang.String)
|
|
673
|
-
* @see System#getProperty(java.lang.String, java.lang.String)
|
|
674
|
-
*/
|
|
675
|
-
getLong(nm: String | string, val: Long | number): number;
|
|
676
|
-
|
|
677
106
|
/**
|
|
678
107
|
* Compares two {@code Long} objects numerically.
|
|
679
108
|
* @param anotherLong the {@code Long} to be compared.
|
|
@@ -682,223 +111,6 @@ export type Long = Number &
|
|
|
682
111
|
*/
|
|
683
112
|
compareTo(anotherLong: Long | number): number;
|
|
684
113
|
|
|
685
|
-
/**
|
|
686
|
-
* Compares two {@code long} values numerically.
|
|
687
|
-
* The value returned is identical to what would be returned by:
|
|
688
|
-
* <pre>
|
|
689
|
-
* Long.valueOf(x).compareTo(Long.valueOf(y))
|
|
690
|
-
* </pre>
|
|
691
|
-
* @param x the first {@code long} to compare
|
|
692
|
-
* @param y the second {@code long} to compare
|
|
693
|
-
* @return the value {@code 0} if {@code x == y};
 a value less than {@code 0} if {@code x < y}; and
 a value greater than {@code 0} if {@code x > y}
|
|
694
|
-
* @since 1.7
|
|
695
|
-
*/
|
|
696
|
-
compare(x: number, y: number): number;
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* Compares two {@code long} values numerically treating the values
|
|
700
|
-
* as unsigned.
|
|
701
|
-
* @param x the first {@code long} to compare
|
|
702
|
-
* @param y the second {@code long} to compare
|
|
703
|
-
* @return the value {@code 0} if {@code x == y}; a value less
 than {@code 0} if {@code x < y} as unsigned values; and
 a value greater than {@code 0} if {@code x > y} as
 unsigned values
|
|
704
|
-
* @since 1.8
|
|
705
|
-
*/
|
|
706
|
-
compareUnsigned(x: number, y: number): number;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Returns the unsigned quotient of dividing the first argument by
|
|
710
|
-
* the second where each argument and the result is interpreted as
|
|
711
|
-
* an unsigned value.
|
|
712
|
-
*
|
|
713
|
-
* <p>Note that in two's complement arithmetic, the three other
|
|
714
|
-
* basic arithmetic operations of add, subtract, and multiply are
|
|
715
|
-
* bit-wise identical if the two operands are regarded as both
|
|
716
|
-
* being signed or both being unsigned. Therefore separate {@code
|
|
717
|
-
* addUnsigned}, etc. methods are not provided.
|
|
718
|
-
* @param dividend the value to be divided
|
|
719
|
-
* @param divisor the value doing the dividing
|
|
720
|
-
* @return the unsigned quotient of the first argument divided by
 the second argument
|
|
721
|
-
* @see #remainderUnsigned
|
|
722
|
-
* @since 1.8
|
|
723
|
-
*/
|
|
724
|
-
divideUnsigned(dividend: number, divisor: number): number;
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Returns the unsigned remainder from dividing the first argument
|
|
728
|
-
* by the second where each argument and the result is interpreted
|
|
729
|
-
* as an unsigned value.
|
|
730
|
-
* @param dividend the value to be divided
|
|
731
|
-
* @param divisor the value doing the dividing
|
|
732
|
-
* @return the unsigned remainder of the first argument divided by
 the second argument
|
|
733
|
-
* @see #divideUnsigned
|
|
734
|
-
* @since 1.8
|
|
735
|
-
*/
|
|
736
|
-
remainderUnsigned(dividend: number, divisor: number): number;
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Returns a {@code long} value with at most a single one-bit, in the
|
|
740
|
-
* position of the highest-order ("leftmost") one-bit in the specified
|
|
741
|
-
* {@code long} value. Returns zero if the specified value has no
|
|
742
|
-
* one-bits in its two's complement binary representation, that is, if it
|
|
743
|
-
* is equal to zero.
|
|
744
|
-
* @param i the value whose highest one bit is to be computed
|
|
745
|
-
* @return a {@code long} value with a single one-bit, in the position
 of the highest-order one-bit in the specified value, or zero if
 the specified value is itself equal to zero.
|
|
746
|
-
* @since 1.5
|
|
747
|
-
*/
|
|
748
|
-
highestOneBit(i: number): number;
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Returns a {@code long} value with at most a single one-bit, in the
|
|
752
|
-
* position of the lowest-order ("rightmost") one-bit in the specified
|
|
753
|
-
* {@code long} value. Returns zero if the specified value has no
|
|
754
|
-
* one-bits in its two's complement binary representation, that is, if it
|
|
755
|
-
* is equal to zero.
|
|
756
|
-
* @param i the value whose lowest one bit is to be computed
|
|
757
|
-
* @return a {@code long} value with a single one-bit, in the position
 of the lowest-order one-bit in the specified value, or zero if
 the specified value is itself equal to zero.
|
|
758
|
-
* @since 1.5
|
|
759
|
-
*/
|
|
760
|
-
lowestOneBit(i: number): number;
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* Returns the number of zero bits preceding the highest-order
|
|
764
|
-
* ("leftmost") one-bit in the two's complement binary representation
|
|
765
|
-
* of the specified {@code long} value. Returns 64 if the
|
|
766
|
-
* specified value has no one-bits in its two's complement representation,
|
|
767
|
-
* in other words if it is equal to zero.
|
|
768
|
-
*
|
|
769
|
-
* <p>Note that this method is closely related to the logarithm base 2.
|
|
770
|
-
* For all positive {@code long} values x:
|
|
771
|
-
* <ul>
|
|
772
|
-
* <li>floor(log<sub>2</sub>(x)) = {@code 63 - numberOfLeadingZeros(x)}
|
|
773
|
-
* <li>ceil(log<sub>2</sub>(x)) = {@code 64 - numberOfLeadingZeros(x - 1)}
|
|
774
|
-
* </ul>
|
|
775
|
-
* @param i the value whose number of leading zeros is to be computed
|
|
776
|
-
* @return the number of zero bits preceding the highest-order
 ("leftmost") one-bit in the two's complement binary representation
 of the specified {@code long} value, or 64 if the value
 is equal to zero.
|
|
777
|
-
* @since 1.5
|
|
778
|
-
*/
|
|
779
|
-
numberOfLeadingZeros(i: number): number;
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* Returns the number of zero bits following the lowest-order ("rightmost")
|
|
783
|
-
* one-bit in the two's complement binary representation of the specified
|
|
784
|
-
* {@code long} value. Returns 64 if the specified value has no
|
|
785
|
-
* one-bits in its two's complement representation, in other words if it is
|
|
786
|
-
* equal to zero.
|
|
787
|
-
* @param i the value whose number of trailing zeros is to be computed
|
|
788
|
-
* @return the number of zero bits following the lowest-order ("rightmost")
 one-bit in the two's complement binary representation of the
 specified {@code long} value, or 64 if the value is equal
 to zero.
|
|
789
|
-
* @since 1.5
|
|
790
|
-
*/
|
|
791
|
-
numberOfTrailingZeros(i: number): number;
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* Returns the number of one-bits in the two's complement binary
|
|
795
|
-
* representation of the specified {@code long} value. This function is
|
|
796
|
-
* sometimes referred to as the <i>population count</i>.
|
|
797
|
-
* @param i the value whose bits are to be counted
|
|
798
|
-
* @return the number of one-bits in the two's complement binary
 representation of the specified {@code long} value.
|
|
799
|
-
* @since 1.5
|
|
800
|
-
*/
|
|
801
|
-
bitCount(i: number): number;
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Returns the value obtained by rotating the two's complement binary
|
|
805
|
-
* representation of the specified {@code long} value left by the
|
|
806
|
-
* specified number of bits. (Bits shifted out of the left hand, or
|
|
807
|
-
* high-order, side reenter on the right, or low-order.)
|
|
808
|
-
*
|
|
809
|
-
* <p>Note that left rotation with a negative distance is equivalent to
|
|
810
|
-
* right rotation: {@code rotateLeft(val, -distance) == rotateRight(val,
|
|
811
|
-
* distance)}. Note also that rotation by any multiple of 64 is a
|
|
812
|
-
* no-op, so all but the last six bits of the rotation distance can be
|
|
813
|
-
* ignored, even if the distance is negative: {@code rotateLeft(val,
|
|
814
|
-
* distance) == rotateLeft(val, distance & 0x3F)}.
|
|
815
|
-
* @param i the value whose bits are to be rotated left
|
|
816
|
-
* @param distance the number of bit positions to rotate left
|
|
817
|
-
* @return the value obtained by rotating the two's complement binary
 representation of the specified {@code long} value left by the
 specified number of bits.
|
|
818
|
-
* @since 1.5
|
|
819
|
-
*/
|
|
820
|
-
rotateLeft(i: number, distance: number): number;
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Returns the value obtained by rotating the two's complement binary
|
|
824
|
-
* representation of the specified {@code long} value right by the
|
|
825
|
-
* specified number of bits. (Bits shifted out of the right hand, or
|
|
826
|
-
* low-order, side reenter on the left, or high-order.)
|
|
827
|
-
*
|
|
828
|
-
* <p>Note that right rotation with a negative distance is equivalent to
|
|
829
|
-
* left rotation: {@code rotateRight(val, -distance) == rotateLeft(val,
|
|
830
|
-
* distance)}. Note also that rotation by any multiple of 64 is a
|
|
831
|
-
* no-op, so all but the last six bits of the rotation distance can be
|
|
832
|
-
* ignored, even if the distance is negative: {@code rotateRight(val,
|
|
833
|
-
* distance) == rotateRight(val, distance & 0x3F)}.
|
|
834
|
-
* @param i the value whose bits are to be rotated right
|
|
835
|
-
* @param distance the number of bit positions to rotate right
|
|
836
|
-
* @return the value obtained by rotating the two's complement binary
 representation of the specified {@code long} value right by the
 specified number of bits.
|
|
837
|
-
* @since 1.5
|
|
838
|
-
*/
|
|
839
|
-
rotateRight(i: number, distance: number): number;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Returns the value obtained by reversing the order of the bits in the
|
|
843
|
-
* two's complement binary representation of the specified {@code long}
|
|
844
|
-
* value.
|
|
845
|
-
* @param i the value to be reversed
|
|
846
|
-
* @return the value obtained by reversing order of the bits in the
 specified {@code long} value.
|
|
847
|
-
* @since 1.5
|
|
848
|
-
*/
|
|
849
|
-
reverse(i: number): number;
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* Returns the signum function of the specified {@code long} value. (The
|
|
853
|
-
* return value is -1 if the specified value is negative; 0 if the
|
|
854
|
-
* specified value is zero; and 1 if the specified value is positive.)
|
|
855
|
-
* @param i the value whose signum is to be computed
|
|
856
|
-
* @return the signum function of the specified {@code long} value.
|
|
857
|
-
* @since 1.5
|
|
858
|
-
*/
|
|
859
|
-
signum(i: number): number;
|
|
860
|
-
|
|
861
|
-
/**
|
|
862
|
-
* Returns the value obtained by reversing the order of the bytes in the
|
|
863
|
-
* two's complement representation of the specified {@code long} value.
|
|
864
|
-
* @param i the value whose bytes are to be reversed
|
|
865
|
-
* @return the value obtained by reversing the bytes in the specified
 {@code long} value.
|
|
866
|
-
* @since 1.5
|
|
867
|
-
*/
|
|
868
|
-
reverseBytes(i: number): number;
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Adds two {@code long} values together as per the + operator.
|
|
872
|
-
* @param a the first operand
|
|
873
|
-
* @param b the second operand
|
|
874
|
-
* @return the sum of {@code a} and {@code b}
|
|
875
|
-
* @see java.util.function.BinaryOperator
|
|
876
|
-
* @since 1.8
|
|
877
|
-
*/
|
|
878
|
-
sum(a: number, b: number): number;
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* Returns the greater of two {@code long} values
|
|
882
|
-
* as if by calling {@link Math#max(long, long) Math.max}.
|
|
883
|
-
* @param a the first operand
|
|
884
|
-
* @param b the second operand
|
|
885
|
-
* @return the greater of {@code a} and {@code b}
|
|
886
|
-
* @see java.util.function.BinaryOperator
|
|
887
|
-
* @since 1.8
|
|
888
|
-
*/
|
|
889
|
-
max(a: number, b: number): number;
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* Returns the smaller of two {@code long} values
|
|
893
|
-
* as if by calling {@link Math#min(long, long) Math.min}.
|
|
894
|
-
* @param a the first operand
|
|
895
|
-
* @param b the second operand
|
|
896
|
-
* @return the smaller of {@code a} and {@code b}
|
|
897
|
-
* @see java.util.function.BinaryOperator
|
|
898
|
-
* @since 1.8
|
|
899
|
-
*/
|
|
900
|
-
min(a: number, b: number): number;
|
|
901
|
-
|
|
902
114
|
/**
|
|
903
115
|
* A constant holding the minimum value a {@code long} can
|
|
904
116
|
* have, -2<sup>63</sup>.
|