/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | ThreadLocalRandomTest.java | 40 // max sampled int bound 43 // max sampled long bound 130 for (int bound : new int[] { 0, -17, Integer.MIN_VALUE }) { 132 rnd.nextInt(bound); 139 * nextInt(least >= bound) throws IllegalArgumentException 157 * nextInt(bound) returns 0 <= value < bound; 161 // sample bound space across prime number increments 162 for (int bound = 2; bound < MAX_INT_BOUN [all...] |
H A D | ThreadLocalRandom8Test.java | 28 // max sampled int bound 31 // max sampled long bound 125 for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 67867967) { 126 final int lo = least, hi = bound; 144 for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUN [all...] |
/libcore/ojluni/src/main/java/java/util/ |
H A D | SplittableRandom.java | 224 static final String BAD_BOUND = "bound must be positive"; 225 static final String BAD_RANGE = "bound must be greater than origin"; 252 * the public nextX(origin, bound) methods. These exist mainly to 259 * origin is greater than bound, acts as unbounded form of 262 * @param origin the least value, unless greater than bound 263 * @param bound the upper bound (exclusive), must not equal origin 266 final long internalNextLong(long origin, long bound) { argument 277 * when the implicit nextLong() bound (2<sup>64</sup>) is not 281 * varies from 1 to 2, depending on the bound 321 internalNextInt(int origin, int bound) argument 349 internalNextDouble(double origin, double bound) argument 420 nextInt(int bound) argument 448 nextInt(int origin, int bound) argument 472 nextLong(long bound) argument 500 nextLong(long origin, long bound) argument 526 nextDouble(double bound) argument 545 nextDouble(double origin, double bound) argument 837 final int bound; field in class:SplittableRandom.RandomIntsSpliterator 838 RandomIntsSpliterator(SplittableRandom rng, long index, long fence, int origin, int bound) argument 893 final long bound; field in class:SplittableRandom.RandomLongsSpliterator 894 RandomLongsSpliterator(SplittableRandom rng, long index, long fence, long origin, long bound) argument 950 final double bound; field in class:SplittableRandom.RandomDoublesSpliterator 951 RandomDoublesSpliterator(SplittableRandom rng, long index, long fence, double origin, double bound) argument [all...] |
H A D | Random.java | 95 static final String BadBound = "bound must be positive"; 96 static final String BadRange = "bound must be greater than origin"; 237 * origin is greater than bound, acts as unbounded form of 240 * @param origin the least value, unless greater than bound 241 * @param bound the upper bound (exclusive), must not equal origin 244 final long internalNextLong(long origin, long bound) { argument 246 if (origin < bound) { 247 long n = bound - origin, m = n - 1; 258 while (r < origin || r >= bound) 275 internalNextInt(int origin, int bound) argument 301 internalNextDouble(double origin, double bound) argument 1007 final int bound; field in class:Random.RandomIntsSpliterator 1008 RandomIntsSpliterator(Random rng, long index, long fence, int origin, int bound) argument 1062 final long bound; field in class:Random.RandomLongsSpliterator 1063 RandomLongsSpliterator(Random rng, long index, long fence, long origin, long bound) argument 1118 final double bound; field in class:Random.RandomDoublesSpliterator 1119 RandomDoublesSpliterator(Random rng, long index, long fence, double origin, double bound) argument [all...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | ThreadLocalRandom.java | 174 * origin is greater than bound, acts as unbounded form of 177 * @param origin the least value, unless greater than bound 178 * @param bound the upper bound (exclusive), must not equal origin 181 final long internalNextLong(long origin, long bound) { argument 183 if (origin < bound) { 184 long n = bound - origin, m = n - 1; 195 while (r < origin || r >= bound) 206 * @param origin the least value, unless greater than bound 207 * @param bound th 210 internalNextInt(int origin, int bound) argument 238 internalNextDouble(double origin, double bound) argument 266 nextInt(int bound) argument 293 nextInt(int origin, int bound) argument 317 nextLong(long bound) argument 344 nextLong(long origin, long bound) argument 370 nextDouble(double bound) argument 389 nextDouble(double origin, double bound) argument 715 final int bound; field in class:ThreadLocalRandom.RandomIntsSpliterator 716 RandomIntsSpliterator(long index, long fence, int origin, int bound) argument 770 final long bound; field in class:ThreadLocalRandom.RandomLongsSpliterator 771 RandomLongsSpliterator(long index, long fence, long origin, long bound) argument 826 final double bound; field in class:ThreadLocalRandom.RandomDoublesSpliterator 827 RandomDoublesSpliterator(long index, long fence, double origin, double bound) argument [all...] |
H A D | Exchanger.java | 129 * @Contended) to Nodes, embedding "bound" as an Exchanger field, 142 * collided at each slot within the current arena bound, it tries 144 * bounds by using a version (sequence) number on the "bound" 146 * participant notices that bound has been updated (in either 240 * Unit for sequence/version bits of bound field. Each successful 241 * change to the bound also adds SEQ. 256 * The bound for spins while waiting for a match. The actual 283 int bound; // Last recorded value of Exchanger.bound field in class:Exchanger.Node 284 int collides; // Number of CAS failures at current bound 318 private volatile int bound; field in class:Exchanger [all...] |
H A D | ForkJoinPool.java | 533 * is usually a good idea). (4) We bound the number of attempts 562 * each probe via the "bound" parameter.) 1900 int bound = (w.config & SPARE_WORKER) != 0 ? 0 : POLL_LIMIT; 1904 if (bound == 0 && tryDropSpare(w)) 1909 if (scan(w, bound, step, (int)r) < 0 && awaitWork(w) < 0) 1921 * at most the given bound attempts to re-poll (fewer if 1927 * @param bound repoll bound as bitmask (0 if spare) 1932 private int scan(WorkQueue w, int bound, int step, int r) { argument 1962 if (++npolls > bound) [all...] |
H A D | ConcurrentHashMap.java | 536 * serves as a lower bound to avoid resizers encountering 2417 for (int i = 0, bound = 0;;) { 2421 if (--i >= bound || finishing) 2431 bound = nextBound; 3327 int baseLimit; // index bound for initial table
|
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | RandomTest.java | 79 final int origin = 128, bound = 256; 84 rands[i] = rand.nextInt(bound - origin) + origin; 87 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); 98 final int origin = 128, bound = 256; 103 rands[i] = rand.nextInt(bound - origin) + origin; 106 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); 108 assertEquals(size, new Random(0).ints(size, origin, bound).count()); 154 final int origin = 128, bound = 256; 162 long[] streamRands = new Random(0).longs(origin, bound).limit(limit).toArray(); 173 final int origin = 128, bound [all...] |
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/ |
H A D | HttpURLConnectionTest.java | 44 private final static Object bound = new Object(); field in class:HttpURLConnectionTest 64 synchronized (bound) { 66 bound.notify(); 166 synchronized(bound) { 168 bound.wait(5000); 201 synchronized(bound) { 202 if (!server.started) bound.wait(5000); 205 synchronized(bound) { 206 if (!proxy.started) bound.wait(5000); 246 synchronized(bound) { [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
H A D | BoundedGenericMethodsTests.java | 57 Type bound = bounds[0]; 58 assertEquals(BoundedGenericMethods.class, bound); 94 Type bound = bounds[0]; 96 assertEquals(BoundedGenericMethods.class, bound);
|
H A D | WildcardTypeTest.java | 64 Type bound = bounds[0]; 65 assertEquals(BoundedWildcardsGenericMethods.class, bound); 119 Type bound = bounds[0]; 121 assertEquals(BoundedWildcardsGenericMethods.class, bound);
|
/libcore/ojluni/src/main/java/java/net/ |
H A D | ServerSocket.java | 57 private boolean bound = false; field in class:ServerSocket 91 * Creates a server socket, bound to the specified port. A port number 323 * is already bound. 352 * is already bound. 363 throw new SocketException("Already bound"); 379 bound = true; 381 bound = false; 384 bound = false; 392 * If the socket was bound prior to being {@link #close closed}, 396 * @return the address to which this socket is bound, [all...] |
H A D | Socket.java | 62 private boolean bound = false; field in class:Socket 264 * @param localAddr the local address the socket is bound to, or 266 * @param localPort the local port the socket is bound to, or 301 * @param localAddr the local address the socket is bound to, or 303 * @param localPort the local port the socket is bound to or 453 bound = false; 615 * If the socket was not bound before the connect, it is now because 618 bound = true; 629 * is already bound. 640 throw new SocketException("Already bound"); [all...] |
H A D | DatagramSocket.java | 51 * broadcast packets a DatagramSocket should be bound to the wildcard address. 53 * a DatagramSocket is bound to a more specific address. 78 private boolean bound = false; field in class:DatagramSocket 116 * Binds socket if not already bound. 178 * on the local host machine. The socket will be bound to the 216 * Creates a datagram socket, bound to the specified local 248 * on the local host machine. The socket will be bound to the 271 * Creates a datagram socket, bound to the specified local 273 * If the IP address is 0.0.0.0, the socket will be bound to the 360 * socket is already bound [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | ServerSocketChannelImpl.java | 95 boolean bound) 102 if (bound) 93 ServerSocketChannelImpl(SelectorProvider sp, FileDescriptor fd, boolean bound) argument
|
H A D | SocketChannelImpl.java | 114 boolean bound) 121 if (bound) 112 SocketChannelImpl(SelectorProvider sp, FileDescriptor fd, boolean bound) argument
|
/libcore/luni/src/test/java/libcore/io/ |
H A D | OsTest.java | 310 PacketSocketAddress bound = (PacketSocketAddress) Libcore.os.getsockname(fd); 311 assertEquals((short) ETH_P_IPV6, bound.sll_protocol); // ETH_P_IPV6 is an int. 312 assertEquals(lo.getIndex(), bound.sll_ifindex); 313 assertEquals(ARPHRD_LOOPBACK, bound.sll_hatype); 314 assertEquals(0, bound.sll_pkttype); 318 assertEquals(6, bound.sll_addr.length); 320 assertEquals(0, bound.sll_addr[i]);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigIntegerTest.java | 943 BigInteger bound = i.multiply(two); 944 for (BigInteger j = bound.negate(); j.compareTo(bound) <= 0; j = j
|