• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package java.util;
27 
28 import android.compat.annotation.UnsupportedAppUsage;
29 
30 @SuppressWarnings({"unchecked", "deprecation", "all"})
31 public class Random implements java.io.Serializable {
32 
Random()33     public Random() {
34         throw new RuntimeException("Stub!");
35     }
36 
Random(long seed)37     public Random(long seed) {
38         throw new RuntimeException("Stub!");
39     }
40 
41     @UnsupportedAppUsage
seedUniquifier()42     private static long seedUniquifier() {
43         throw new RuntimeException("Stub!");
44     }
45 
initialScramble(long seed)46     private static long initialScramble(long seed) {
47         throw new RuntimeException("Stub!");
48     }
49 
setSeed(long seed)50     public synchronized void setSeed(long seed) {
51         throw new RuntimeException("Stub!");
52     }
53 
next(int bits)54     protected int next(int bits) {
55         throw new RuntimeException("Stub!");
56     }
57 
nextBytes(byte[] bytes)58     public void nextBytes(byte[] bytes) {
59         throw new RuntimeException("Stub!");
60     }
61 
internalNextLong(long origin, long bound)62     final long internalNextLong(long origin, long bound) {
63         throw new RuntimeException("Stub!");
64     }
65 
internalNextInt(int origin, int bound)66     final int internalNextInt(int origin, int bound) {
67         throw new RuntimeException("Stub!");
68     }
69 
internalNextDouble(double origin, double bound)70     final double internalNextDouble(double origin, double bound) {
71         throw new RuntimeException("Stub!");
72     }
73 
nextInt()74     public int nextInt() {
75         throw new RuntimeException("Stub!");
76     }
77 
nextInt(int bound)78     public int nextInt(int bound) {
79         throw new RuntimeException("Stub!");
80     }
81 
nextLong()82     public long nextLong() {
83         throw new RuntimeException("Stub!");
84     }
85 
nextBoolean()86     public boolean nextBoolean() {
87         throw new RuntimeException("Stub!");
88     }
89 
nextFloat()90     public float nextFloat() {
91         throw new RuntimeException("Stub!");
92     }
93 
nextDouble()94     public double nextDouble() {
95         throw new RuntimeException("Stub!");
96     }
97 
nextGaussian()98     public synchronized double nextGaussian() {
99         throw new RuntimeException("Stub!");
100     }
101 
ints(long streamSize)102     public java.util.stream.IntStream ints(long streamSize) {
103         throw new RuntimeException("Stub!");
104     }
105 
ints()106     public java.util.stream.IntStream ints() {
107         throw new RuntimeException("Stub!");
108     }
109 
ints( long streamSize, int randomNumberOrigin, int randomNumberBound)110     public java.util.stream.IntStream ints(
111             long streamSize, int randomNumberOrigin, int randomNumberBound) {
112         throw new RuntimeException("Stub!");
113     }
114 
ints(int randomNumberOrigin, int randomNumberBound)115     public java.util.stream.IntStream ints(int randomNumberOrigin, int randomNumberBound) {
116         throw new RuntimeException("Stub!");
117     }
118 
longs(long streamSize)119     public java.util.stream.LongStream longs(long streamSize) {
120         throw new RuntimeException("Stub!");
121     }
122 
longs()123     public java.util.stream.LongStream longs() {
124         throw new RuntimeException("Stub!");
125     }
126 
longs( long streamSize, long randomNumberOrigin, long randomNumberBound)127     public java.util.stream.LongStream longs(
128             long streamSize, long randomNumberOrigin, long randomNumberBound) {
129         throw new RuntimeException("Stub!");
130     }
131 
longs(long randomNumberOrigin, long randomNumberBound)132     public java.util.stream.LongStream longs(long randomNumberOrigin, long randomNumberBound) {
133         throw new RuntimeException("Stub!");
134     }
135 
doubles(long streamSize)136     public java.util.stream.DoubleStream doubles(long streamSize) {
137         throw new RuntimeException("Stub!");
138     }
139 
doubles()140     public java.util.stream.DoubleStream doubles() {
141         throw new RuntimeException("Stub!");
142     }
143 
doubles( long streamSize, double randomNumberOrigin, double randomNumberBound)144     public java.util.stream.DoubleStream doubles(
145             long streamSize, double randomNumberOrigin, double randomNumberBound) {
146         throw new RuntimeException("Stub!");
147     }
148 
doubles( double randomNumberOrigin, double randomNumberBound)149     public java.util.stream.DoubleStream doubles(
150             double randomNumberOrigin, double randomNumberBound) {
151         throw new RuntimeException("Stub!");
152     }
153 
readObject(java.io.ObjectInputStream s)154     private void readObject(java.io.ObjectInputStream s)
155             throws java.lang.ClassNotFoundException, java.io.IOException {
156         throw new RuntimeException("Stub!");
157     }
158 
writeObject(java.io.ObjectOutputStream s)159     private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
160         throw new RuntimeException("Stub!");
161     }
162 
resetSeed(long seedVal)163     private void resetSeed(long seedVal) {
164         throw new RuntimeException("Stub!");
165     }
166 
167     static final java.lang.String BadBound = "bound must be positive";
168 
169     static final java.lang.String BadRange = "bound must be greater than origin";
170 
171     static final java.lang.String BadSize = "size must be non-negative";
172 
173     private static final double DOUBLE_UNIT = 1.1102230246251565E-16;
174 
175     private static final long addend = 11L; // 0xbL
176 
177     private boolean haveNextNextGaussian = false;
178 
179     private static final long mask = 281474976710655L; // 0xffffffffffffL
180 
181     private static final long multiplier = 25214903917L; // 0x5deece66dL
182 
183     private double nextNextGaussian;
184 
185     private final java.util.concurrent.atomic.AtomicLong seed;
186 
187     {
188         seed = null;
189     }
190 
191     private static final long seedOffset;
192 
193     static {
194         seedOffset = 0;
195     }
196 
197     private static final java.util.concurrent.atomic.AtomicLong seedUniquifier;
198 
199     static {
200         seedUniquifier = null;
201     }
202 
203     private static final java.io.ObjectStreamField[] serialPersistentFields;
204 
205     static {
206         serialPersistentFields = new java.io.ObjectStreamField[0];
207     }
208 
209     static final long serialVersionUID = 3905348978240129619L; // 0x363296344bf00a53L
210 
211     private static final sun.misc.Unsafe unsafe;
212 
213     static {
214         unsafe = null;
215     }
216 
217     @SuppressWarnings({"unchecked", "deprecation", "all"})
218     static final class RandomDoublesSpliterator implements java.util.Spliterator.OfDouble {
219 
RandomDoublesSpliterator( java.util.Random rng, long index, long fence, double origin, double bound)220         RandomDoublesSpliterator(
221                 java.util.Random rng, long index, long fence, double origin, double bound) {
222             throw new RuntimeException("Stub!");
223         }
224 
trySplit()225         public java.util.Random.RandomDoublesSpliterator trySplit() {
226             throw new RuntimeException("Stub!");
227         }
228 
estimateSize()229         public long estimateSize() {
230             throw new RuntimeException("Stub!");
231         }
232 
characteristics()233         public int characteristics() {
234             throw new RuntimeException("Stub!");
235         }
236 
tryAdvance(java.util.function.DoubleConsumer consumer)237         public boolean tryAdvance(java.util.function.DoubleConsumer consumer) {
238             throw new RuntimeException("Stub!");
239         }
240 
forEachRemaining(java.util.function.DoubleConsumer consumer)241         public void forEachRemaining(java.util.function.DoubleConsumer consumer) {
242             throw new RuntimeException("Stub!");
243         }
244 
245         final double bound;
246 
247         {
248             bound = 0;
249         }
250 
251         final long fence;
252 
253         {
254             fence = 0;
255         }
256 
257         long index;
258 
259         final double origin;
260 
261         {
262             origin = 0;
263         }
264 
265         final java.util.Random rng;
266 
267         {
268             rng = null;
269         }
270     }
271 
272     @SuppressWarnings({"unchecked", "deprecation", "all"})
273     static final class RandomIntsSpliterator implements java.util.Spliterator.OfInt {
274 
RandomIntsSpliterator(java.util.Random rng, long index, long fence, int origin, int bound)275         RandomIntsSpliterator(java.util.Random rng, long index, long fence, int origin, int bound) {
276             throw new RuntimeException("Stub!");
277         }
278 
trySplit()279         public java.util.Random.RandomIntsSpliterator trySplit() {
280             throw new RuntimeException("Stub!");
281         }
282 
estimateSize()283         public long estimateSize() {
284             throw new RuntimeException("Stub!");
285         }
286 
characteristics()287         public int characteristics() {
288             throw new RuntimeException("Stub!");
289         }
290 
tryAdvance(java.util.function.IntConsumer consumer)291         public boolean tryAdvance(java.util.function.IntConsumer consumer) {
292             throw new RuntimeException("Stub!");
293         }
294 
forEachRemaining(java.util.function.IntConsumer consumer)295         public void forEachRemaining(java.util.function.IntConsumer consumer) {
296             throw new RuntimeException("Stub!");
297         }
298 
299         final int bound;
300 
301         {
302             bound = 0;
303         }
304 
305         final long fence;
306 
307         {
308             fence = 0;
309         }
310 
311         long index;
312 
313         final int origin;
314 
315         {
316             origin = 0;
317         }
318 
319         final java.util.Random rng;
320 
321         {
322             rng = null;
323         }
324     }
325 
326     @SuppressWarnings({"unchecked", "deprecation", "all"})
327     static final class RandomLongsSpliterator implements java.util.Spliterator.OfLong {
328 
RandomLongsSpliterator( java.util.Random rng, long index, long fence, long origin, long bound)329         RandomLongsSpliterator(
330                 java.util.Random rng, long index, long fence, long origin, long bound) {
331             throw new RuntimeException("Stub!");
332         }
333 
trySplit()334         public java.util.Random.RandomLongsSpliterator trySplit() {
335             throw new RuntimeException("Stub!");
336         }
337 
estimateSize()338         public long estimateSize() {
339             throw new RuntimeException("Stub!");
340         }
341 
characteristics()342         public int characteristics() {
343             throw new RuntimeException("Stub!");
344         }
345 
tryAdvance(java.util.function.LongConsumer consumer)346         public boolean tryAdvance(java.util.function.LongConsumer consumer) {
347             throw new RuntimeException("Stub!");
348         }
349 
forEachRemaining(java.util.function.LongConsumer consumer)350         public void forEachRemaining(java.util.function.LongConsumer consumer) {
351             throw new RuntimeException("Stub!");
352         }
353 
354         final long bound;
355 
356         {
357             bound = 0;
358         }
359 
360         final long fence;
361 
362         {
363             fence = 0;
364         }
365 
366         long index;
367 
368         final long origin;
369 
370         {
371             origin = 0;
372         }
373 
374         final java.util.Random rng;
375 
376         {
377             rng = null;
378         }
379     }
380 }
381