Home
last modified time | relevance | path

Searched refs:bound (Results 1 – 23 of 23) sorted by relevance

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandomTest.java130 for (int bound : new int[] { 0, -17, Integer.MIN_VALUE }) {
132 rnd.nextInt(bound);
162 for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
163 int f = ThreadLocalRandom.current().nextInt(bound);
164 assertTrue(0 <= f && f < bound);
168 (j = ThreadLocalRandom.current().nextInt(bound)) == f) {
169 assertTrue(0 <= j && j < bound);
182 for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 49979687) {
183 int f = ThreadLocalRandom.current().nextInt(least, bound);
184 assertTrue(least <= f && f < bound);
[all …]
DThreadLocalRandom8Test.java125 for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 67867967) { in testBoundedInts()
126 final int lo = least, hi = bound; in testBoundedInts()
144 …for (long bound = least + 2; bound > least && bound < MAX_LONG_BOUND; bound += Math.abs(bound * 79… in testBoundedLongs()
145 final long lo = least, hi = bound; in testBoundedLongs()
163 for (double bound = least * 1.0011; bound < 1.0e20; bound *= 17) { in testBoundedDoubles()
164 final double lo = least, hi = bound; in testBoundedDoubles()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalRandomTest.java197 for (int bound : new int[] { 0, -17, Integer.MIN_VALUE }) {
199 rnd.nextInt(bound);
229 for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
230 int f = ThreadLocalRandom.current().nextInt(bound);
231 assertTrue(0 <= f && f < bound);
235 (j = ThreadLocalRandom.current().nextInt(bound)) == f) {
236 assertTrue(0 <= j && j < bound);
249 for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 49979687) {
250 int f = ThreadLocalRandom.current().nextInt(least, bound);
251 assertTrue(least <= f && f < bound);
[all …]
DSplittableRandomTest.java193 for (int bound = 2; bound < MAX_INT_BOUND; bound += 524959) {
194 int f = sr.nextInt(bound);
195 assertTrue(0 <= f && f < bound);
199 (j = sr.nextInt(bound)) == f) {
200 assertTrue(0 <= j && j < bound);
214 for (int bound = least + 2; bound > least && bound < MAX_INT_BOUND; bound += 49979687) {
215 int f = sr.nextInt(least, bound);
216 assertTrue(least <= f && f < bound);
220 (j = sr.nextInt(least, bound)) == f) {
221 assertTrue(least <= j && j < bound);
[all …]
/libcore/ojluni/src/main/java/java/util/
DSplittableRandom.java265 final long internalNextLong(long origin, long bound) { in internalNextLong() argument
293 if (origin < bound) { in internalNextLong()
294 long n = bound - origin, m = n - 1; in internalNextLong()
305 while (r < origin || r >= bound) in internalNextLong()
320 final int internalNextInt(int origin, int bound) { in internalNextInt() argument
322 if (origin < bound) { in internalNextInt()
323 int n = bound - origin, m = n - 1; in internalNextInt()
334 while (r < origin || r >= bound) in internalNextInt()
348 final double internalNextDouble(double origin, double bound) { in internalNextDouble() argument
350 if (origin < bound) { in internalNextDouble()
[all …]
DRandom.java244 final long internalNextLong(long origin, long bound) { in internalNextLong() argument
246 if (origin < bound) { in internalNextLong()
247 long n = bound - origin, m = n - 1; in internalNextLong()
258 while (r < origin || r >= bound) in internalNextLong()
275 final int internalNextInt(int origin, int bound) { in internalNextInt() argument
276 if (origin < bound) { in internalNextInt()
277 int n = bound - origin; in internalNextInt()
285 } while (r < origin || r >= bound); in internalNextInt()
301 final double internalNextDouble(double origin, double bound) { in internalNextDouble() argument
303 if (origin < bound) { in internalNextDouble()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DThreadLocalRandom.java210 final long internalNextLong(long origin, long bound) { in internalNextLong() argument
212 if (origin < bound) { in internalNextLong()
213 long n = bound - origin, m = n - 1; in internalNextLong()
224 while (r < origin || r >= bound) in internalNextLong()
239 final int internalNextInt(int origin, int bound) { in internalNextInt() argument
241 if (origin < bound) { in internalNextInt()
242 int n = bound - origin, m = n - 1; in internalNextInt()
253 while (r < origin || r >= bound) in internalNextInt()
267 final double internalNextDouble(double origin, double bound) { in internalNextDouble() argument
269 if (origin < bound) { in internalNextDouble()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java79 final int origin = 128, bound = 256; in test_ints$II() local
84 rands[i] = rand.nextInt(bound - origin) + origin; in test_ints$II()
87 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); in test_ints$II()
98 final int origin = 128, bound = 256; in test_ints$LII() local
103 rands[i] = rand.nextInt(bound - origin) + origin; in test_ints$LII()
106 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); in test_ints$LII()
108 assertEquals(size, new Random(0).ints(size, origin, bound).count()); in test_ints$LII()
154 final int origin = 128, bound = 256; in test_longs$II() local
162 long[] streamRands = new Random(0).longs(origin, bound).limit(limit).toArray(); in test_longs$II()
173 final int origin = 128, bound = 256; in test_longs$LII() local
[all …]
DTreeMapTest.java596 private static<V> NavigableMap<Integer, V> applyBound(char bound, NavigableMap<Integer, V> m) { in applyBound() argument
598 if (isLowerBound(bound)) { in applyBound()
599 return m.tailMap(boundValue, isBoundInclusive(bound)); in applyBound()
601 return m.headMap(boundValue, isBoundInclusive(bound)); in applyBound()
605 private static boolean isBoundInclusive(char bound) { in isBoundInclusive() argument
606 return bound == '[' || bound == ']'; in isBoundInclusive()
613 private static boolean isLowerBound(char bound) { in isLowerBound() argument
614 return bound == '[' || bound == '('; in isLowerBound()
/libcore/ojluni/annotations/hiddenapi/java/util/
DRandom.java62 final long internalNextLong(long origin, long bound) { in internalNextLong() argument
66 final int internalNextInt(int origin, int bound) { in internalNextInt() argument
70 final double internalNextDouble(double origin, double bound) { in internalNextDouble() argument
78 public int nextInt(int bound) { in nextInt() argument
221 java.util.Random rng, long index, long fence, double origin, double bound) { in RandomDoublesSpliterator() argument
245 final double bound; field in Random.RandomDoublesSpliterator
248 bound = 0;
275 RandomIntsSpliterator(java.util.Random rng, long index, long fence, int origin, int bound) { in RandomIntsSpliterator() argument
299 final int bound; field in Random.RandomIntsSpliterator
302 bound = 0;
[all …]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
DHttpURLConnectionTest.java44 private final static Object bound = new Object(); field in HttpURLConnectionTest
64 synchronized (bound) { in run()
66 bound.notify(); in run()
166 synchronized(bound) { in testGetOutputStream()
168 bound.wait(5000); in testGetOutputStream()
201 synchronized(bound) { in testUsingProxy()
202 if (!server.started) bound.wait(5000); in testUsingProxy()
205 synchronized(bound) { in testUsingProxy()
206 if (!proxy.started) bound.wait(5000); in testUsingProxy()
246 synchronized(bound) { in testUsingProxySelector()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DBoundedGenericMethodsTests.java57 Type bound = bounds[0]; in checkBoundedTypeParameter() local
58 assertEquals(BoundedGenericMethods.class, bound); in checkBoundedTypeParameter()
94 Type bound = bounds[0]; in checkReturnType() local
96 assertEquals(BoundedGenericMethods.class, bound); in checkReturnType()
DWildcardTypeTest.java64 Type bound = bounds[0]; in checkBoundedTypeParameter() local
65 assertEquals(BoundedWildcardsGenericMethods.class, bound); in checkBoundedTypeParameter()
123 Type bound = bounds[0]; in checkReturnType() local
125 assertEquals(BoundedWildcardsGenericMethods.class, bound); in checkReturnType()
/libcore/ojluni/src/main/java/java/net/
DServerSocket.java57 private boolean bound = false; field in ServerSocket
379 bound = true; in bind()
381 bound = false; in bind()
384 bound = false; in bind()
620 return bound || oldImpl; in isBound()
761 bound = true; in setBound()
DDatagramSocket.java79 private boolean bound = false; field in DatagramSocket
417 bound = true; in bind()
551 return bound; in isBound()
/libcore/ojluni/annotations/hiddenapi/java/net/
DServerSocket.java163 private boolean bound = false; field in ServerSocket
DDatagramSocket.java211 private boolean bound = false; field in DatagramSocket
DSocket.java299 private boolean bound = false; field in Socket
/libcore/ojluni/src/main/java/sun/nio/ch/
DServerSocketChannelImpl.java95 boolean bound) in ServerSocketChannelImpl() argument
102 if (bound) in ServerSocketChannelImpl()
DSocketChannelImpl.java143 boolean bound) in SocketChannelImpl() argument
156 if (bound) in SocketChannelImpl()
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java639 PacketSocketAddress bound = (PacketSocketAddress) Os.getsockname(fd); in test_PacketSocketAddress() local
640 assertEquals(ETH_P_IPV6, bound.sll_protocol); in test_PacketSocketAddress()
641 assertEquals(lo.getIndex(), bound.sll_ifindex); in test_PacketSocketAddress()
642 assertEquals(ARPHRD_LOOPBACK, bound.sll_hatype); in test_PacketSocketAddress()
643 assertEquals(0, bound.sll_pkttype); in test_PacketSocketAddress()
647 assertNotNull(bound.sll_addr); in test_PacketSocketAddress()
648 assertEquals(6, bound.sll_addr.length); in test_PacketSocketAddress()
650 assertEquals(0, bound.sll_addr[i]); in test_PacketSocketAddress()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java939 BigInteger bound = i.multiply(two); in testDivRanges() local
940 for (BigInteger j = bound.negate(); j.compareTo(bound) <= 0; j = j in testDivRanges()
/libcore/luni/src/test/java/libcore/java/lang/invoke/
DMethodHandleCombinersTest.java632 MethodHandle bound = stringCharAt.bindTo("foo"); in testBindTo() local
633 value = (char) bound.invoke(0); in testBindTo()
644 bound = stringCharAt.bindTo(null); in testBindTo()
646 bound.invoke(0); in testBindTo()
654 bound = integerParseInt.bindTo("78452"); in testBindTo()
655 int intValue = (int) bound.invoke(); in testBindTo()