Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 434) sorted by relevance

12345678910>>...18

/libcore/ojluni/src/main/java/java/nio/
DBits.java45 static short swap(short x) { in swap() argument
46 return Short.reverseBytes(x); in swap()
49 static char swap(char x) { in swap() argument
50 return Character.reverseBytes(x); in swap()
53 static int swap(int x) { in swap() argument
54 return Integer.reverseBytes(x); in swap()
57 static long swap(long x) { in swap() argument
58 return Long.reverseBytes(x); in swap()
96 private static byte char1(char x) { return (byte)(x >> 8); } in char1() argument
97 private static byte char0(char x) { return (byte)(x ); } in char0() argument
[all …]
/libcore/ojluni/src/main/java/java/sql/
DSQLOutput.java67 void writeString(String x) throws SQLException; in writeString() argument
80 void writeBoolean(boolean x) throws SQLException; in writeBoolean() argument
93 void writeByte(byte x) throws SQLException; in writeByte() argument
106 void writeShort(short x) throws SQLException; in writeShort() argument
119 void writeInt(int x) throws SQLException; in writeInt() argument
132 void writeLong(long x) throws SQLException; in writeLong() argument
145 void writeFloat(float x) throws SQLException; in writeFloat() argument
158 void writeDouble(double x) throws SQLException; in writeDouble() argument
171 void writeBigDecimal(java.math.BigDecimal x) throws SQLException; in writeBigDecimal() argument
184 void writeBytes(byte[] x) throws SQLException; in writeBytes() argument
[all …]
DPreparedStatement.java130 void setBoolean(int parameterIndex, boolean x) throws SQLException; in setBoolean() argument
143 void setByte(int parameterIndex, byte x) throws SQLException; in setByte() argument
156 void setShort(int parameterIndex, short x) throws SQLException; in setShort() argument
169 void setInt(int parameterIndex, int x) throws SQLException; in setInt() argument
182 void setLong(int parameterIndex, long x) throws SQLException; in setLong() argument
195 void setFloat(int parameterIndex, float x) throws SQLException; in setFloat() argument
208 void setDouble(int parameterIndex, double x) throws SQLException; in setDouble() argument
221 void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; in setBigDecimal() argument
237 void setString(int parameterIndex, String x) throws SQLException; in setString() argument
251 void setBytes(int parameterIndex, byte x[]) throws SQLException; in setBytes() argument
[all …]
/libcore/ojluni/src/test/java/lang/Math/
DExactArithTests.java75 static void testIntegerExact(int x, int y) { in testIntegerExact() argument
78 int sum = Math.addExact(x, y); in testIntegerExact()
79 long sum2 = (long) x + (long) y; in testIntegerExact()
81 …fail("FAIL: int Math.addExact(" + x + " + " + y + ") = " + sum + "; expected Arithmetic exception"… in testIntegerExact()
83 … fail("FAIL: long Math.addExact(" + x + " + " + y + ") = " + sum + "; expected: " + sum2); in testIntegerExact()
86 long sum2 = (long) x + (long) y; in testIntegerExact()
88 … fail("FAIL: int Math.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
95 int diff = Math.subtractExact(x, y); in testIntegerExact()
96 long diff2 = (long) x - (long) y; in testIntegerExact()
98 … fail("FAIL: int Math.subtractExact(" + x + " - " + y + ") = " + diff + "; expected: " + diff2); in testIntegerExact()
[all …]
DDivModTests.java88 static void testIntFloorDivMod(int x, int y, Object divExpected, Object modExpected) { in testIntFloorDivMod() argument
89 testIntFloorDiv(x, y, divExpected); in testIntFloorDivMod()
90 testIntFloorMod(x, y, modExpected); in testIntFloorDivMod()
96 static void testIntFloorDiv(int x, int y, Object expected) { in testIntFloorDiv() argument
97 Object result = doFloorDiv(x, y); in testIntFloorDiv()
99 fail("FAIL: Math.floorDiv(%d, %d) = %s; expected %s%n", x, y, result, expected); in testIntFloorDiv()
102 Object strict_result = doStrictFloorDiv(x, y); in testIntFloorDiv()
104 … fail("FAIL: StrictMath.floorDiv(%d, %d) = %s; expected %s%n", x, y, strict_result, expected); in testIntFloorDiv()
111 static void testIntFloorMod(int x, int y, Object expected) { in testIntFloorMod() argument
112 Object result = doFloorMod(x, y); in testIntFloorMod()
[all …]
/libcore/ojluni/src/main/java/javax/sql/
DRowSet.java548 void setBoolean(int parameterIndex, boolean x) throws SQLException; in setBoolean() argument
564 void setBoolean(String parameterName, boolean x) throws SQLException; in setBoolean() argument
575 void setByte(int parameterIndex, byte x) throws SQLException; in setByte() argument
591 void setByte(String parameterName, byte x) throws SQLException; in setByte() argument
602 void setShort(int parameterIndex, short x) throws SQLException; in setShort() argument
618 void setShort(String parameterName, short x) throws SQLException; in setShort() argument
629 void setInt(int parameterIndex, int x) throws SQLException; in setInt() argument
645 void setInt(String parameterName, int x) throws SQLException; in setInt() argument
656 void setLong(int parameterIndex, long x) throws SQLException; in setLong() argument
672 void setLong(String parameterName, long x) throws SQLException; in setLong() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DArrayTest.java31 int[] x = { 1 }; in test_getLjava_lang_ObjectI() local
35 ret = Array.get(x, 0); in test_getLjava_lang_ObjectI()
52 ret = Array.get(x, 4); in test_getLjava_lang_ObjectI()
99 boolean[] x = { true }; in test_getBooleanLjava_lang_ObjectI()
103 ret = Array.getBoolean(x, 0); in test_getBooleanLjava_lang_ObjectI()
119 ret = Array.getBoolean(x, 4); in test_getBooleanLjava_lang_ObjectI()
145 byte[] x = { 1 }; in test_getByteLjava_lang_ObjectI()
149 ret = Array.getByte(x, 0); in test_getByteLjava_lang_ObjectI()
165 ret = Array.getByte(x, 4); in test_getByteLjava_lang_ObjectI()
191 char[] x = { 1 }; in test_getCharLjava_lang_ObjectI() local
[all …]
/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java99 static void testIntegerExact(int x, int y) { in testIntegerExact() argument
102 int sum = StrictMath.addExact(x, y); in testIntegerExact()
103 long sum2 = (long) x + (long) y; in testIntegerExact()
105 …fail("FAIL: int StrictMath.addExact(" + x + " + " + y + ") = " + sum + "; expected Arithmetic exce… in testIntegerExact()
107 … fail("FAIL: long StrictMath.addExact(" + x + " + " + y + ") = " + sum + "; expected: " + sum2); in testIntegerExact()
110 long sum2 = (long) x + (long) y; in testIntegerExact()
112 … fail("FAIL: int StrictMath.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
119 int diff = StrictMath.subtractExact(x, y); in testIntegerExact()
120 long diff2 = (long) x - (long) y; in testIntegerExact()
122 …fail("FAIL: int StrictMath.subtractExact(" + x + " - " + y + ") = " + diff + "; expected: " + diff… in testIntegerExact()
[all …]
/libcore/ojluni/src/main/java/java/util/
DLinkedList.java209 E unlink(Node<E> x) { in unlink() argument
211 final E element = x.item; in unlink()
212 final Node<E> next = x.next; in unlink()
213 final Node<E> prev = x.prev; in unlink()
219 x.prev = null; in unlink()
226 x.next = null; in unlink()
229 x.item = null; in unlink()
357 for (Node<E> x = first; x != null; x = x.next) { in remove()
358 if (x.item == null) { in remove()
359 unlink(x); in remove()
[all …]
/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java523 public static native double atan2(double y, double x); in atan2() argument
737 public static int addExact(int x, int y) { in addExact() argument
738 return Math.addExact(x, y); in addExact()
752 public static long addExact(long x, long y) { in addExact() argument
753 return Math.addExact(x, y); in addExact()
767 public static int subtractExact(int x, int y) { in subtractExact() argument
768 return Math.subtractExact(x, y); in subtractExact()
782 public static long subtractExact(long x, long y) { in subtractExact() argument
783 return Math.subtractExact(x, y); in subtractExact()
797 public static int multiplyExact(int x, int y) { in multiplyExact() argument
[all …]
DMath.java520 public static native double atan2(double y, double x); in atan2() argument
822 public static int addExact(int x, int y) { in addExact() argument
823 int r = x + y; in addExact()
825 if (((x ^ r) & (y ^ r)) < 0) { in addExact()
841 public static long addExact(long x, long y) { in addExact() argument
842 long r = x + y; in addExact()
844 if (((x ^ r) & (y ^ r)) < 0) { in addExact()
860 public static int subtractExact(int x, int y) { in subtractExact() argument
861 int r = x - y; in subtractExact()
864 if (((x ^ y) & (x ^ r)) < 0) { in subtractExact()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DConcurrentHashMap8Test.java94 map.computeIfAbsent(six, x -> "Z"); in testComputeIfAbsent()
103 assertEquals("A", map.computeIfAbsent(one, x -> "Z")); in testComputeIfAbsent2()
111 map.computeIfAbsent(six, x -> null); in testComputeIfAbsent3()
120 map.computeIfPresent(six, (x, y) -> "Z"); in testComputeIfPresent()
129 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2()
137 map.compute(six, (x, y) -> null); in testCompute()
146 assertEquals("Z", map.compute(six, (x, y) -> "Z")); in testCompute2()
154 assertEquals("Z", map.compute(one, (x, y) -> "Z")); in testCompute3()
162 map.compute(one, (x, y) -> null); in testCompute4()
171 assertEquals("Y", map.merge(six, "Y", (x, y) -> "Z")); in testMerge1()
[all …]
DTimeUnitTest.java128 for (TimeUnit x : TimeUnit.values()) { in testConvert()
134 for (long z : zs) assertEquals(z, x.convert(z, x)); in testConvert()
321 for (TimeUnit x : TimeUnit.values()) in testConvertSaturate()
323 long ratio = x.toNanos(1) / y.toNanos(1); in testConvertSaturate()
325 assertEquals(ratio, y.convert(1, x)); in testConvertSaturate()
326 assertEquals(1, x.convert(ratio, y)); in testConvertSaturate()
328 assertEquals(max * ratio, y.convert(max, x)); in testConvertSaturate()
329 assertEquals(-max * ratio, y.convert(-max, x)); in testConvertSaturate()
330 assertEquals(max, x.convert(max * ratio, y)); in testConvertSaturate()
331 assertEquals(-max, x.convert(-max * ratio, y)); in testConvertSaturate()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentHashMap8Test.java70 map.computeIfAbsent(six, (x) -> "Z"); in testComputeIfAbsent()
79 assertEquals("A", map.computeIfAbsent(one, (x) -> "Z")); in testComputeIfAbsent2()
87 map.computeIfAbsent(six, (x) -> null); in testComputeIfAbsent3()
96 map.computeIfPresent(six, (x, y) -> "Z"); in testComputeIfPresent()
105 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2()
113 map.compute(six, (x, y) -> null); in testCompute()
122 assertEquals("Z", map.compute(six, (x, y) -> "Z")); in testCompute2()
130 assertEquals("Z", map.compute(one, (x, y) -> "Z")); in testCompute3()
138 map.compute(one, (x, y) -> null); in testCompute4()
147 assertEquals("Y", map.merge(six, "Y", (x, y) -> "Z")); in testMerge1()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixCopyFile.java135 } catch (UnixException x) { in copyDirectory()
136 x.rethrowAsIOException(target); in copyDirectory()
149 } catch (UnixException x) { in copyDirectory()
153 x.rethrowAsIOException(target); in copyDirectory()
169 } catch (UnixException x) { in copyDirectory()
172 x.rethrowAsIOException(target); in copyDirectory()
180 } catch (UnixException x) { in copyDirectory()
182 x.rethrowAsIOException(source); in copyDirectory()
201 } catch (UnixException x) { in copyDirectory()
204 x.rethrowAsIOException(target); in copyDirectory()
[all …]
/libcore/ojluni/src/main/java/sun/invoke/util/
DWrapper.java187 for (Wrapper x : values()) { in checkConvertibleFrom()
188 if (w == x) continue; in checkConvertibleFrom()
189 if (x.isFloating()) in checkConvertibleFrom()
190 assert(!w.isConvertibleFrom(x)); in checkConvertibleFrom()
191 else if (x.isSigned()) { in checkConvertibleFrom()
192 if (w.compareTo(x) < 0) in checkConvertibleFrom()
193 assert(!w.isConvertibleFrom(x)); in checkConvertibleFrom()
195 assert(w.isConvertibleFrom(x)); in checkConvertibleFrom()
201 for (Wrapper x : values()) { in checkConvertibleFrom()
202 if (w == x) continue; in checkConvertibleFrom()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DIntegerBenchmark.java62 private static int popX(long x) { in popX() argument
66 x = x - ((x >>> 1) & 0x55555555); in popX()
67 x = (x & 0x33333333) + ((x >>> 2) & 0x33333333); in popX()
68 x = (x + (x >>> 4)) & 0x0f0f0f0f; in popX()
69 x = x + (x >>> 8); in popX()
70 x = x + (x >>> 16); in popX()
71 return (int) x & 0x0000003f; in popX()
/libcore/luni/src/test/java/libcore/java/util/function/
DIntUnaryOperatorTest.java31 IntUnaryOperator plusOne = x -> x + 1; in testCompose()
32 IntUnaryOperator twice = x -> 2 *x; in testCompose()
37 IntUnaryOperator plusOne = x -> x + 1; in testCompose_null()
45 IntUnaryOperator plusOne = x -> x + 1; in testAndThen()
46 IntUnaryOperator twice = x -> 2 *x; in testAndThen()
51 IntUnaryOperator plusOne = x -> x + 1; in testAndThen_null()
DLongUnaryOperatorTest.java31 LongUnaryOperator plusOne = x -> x + 1L; in testCompose()
32 LongUnaryOperator twice = x -> 2L *x; in testCompose()
37 LongUnaryOperator plusOne = x -> x + 1; in testCompose_null()
45 LongUnaryOperator plusOne = x -> x + 1L; in testAndThen()
46 LongUnaryOperator twice = x -> 2L *x; in testAndThen()
51 LongUnaryOperator plusOne = x -> x + 1L; in testAndThen_null()
DDoublePredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
67 DoublePredicate alwaysTrue = x -> true; in testAnd_null()
76 DoublePredicate alwaysTrue = x -> { assertEquals(x, arg); return true; }; in testNegate()
79 DoublePredicate alwaysFalse = x -> { assertEquals(x, arg); return false; }; in testNegate()
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testOr()
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testOr()
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testOr()
[all …]
DIntPredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
67 IntPredicate alwaysTrue = x -> true; in testAnd_null()
76 IntPredicate alwaysTrue = x -> { assertEquals(x, arg); return true; }; in testNegate()
79 IntPredicate alwaysFalse = x -> { assertEquals(x, arg); return false; }; in testNegate()
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testOr()
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testOr()
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testOr()
[all …]
DFunctionTest.java32 Function<Double, Double> plusOne = x -> x + 1.0d; in testCompose()
33 Function<Double, Double> twice = x -> 2 *x; in testCompose()
38 Function<Double, Double> plusOne = x -> x + 1.0d; in testCompose_null()
46 Function<Double, Double> plusOne = x -> x + 1.0d; in testAndThen()
47 Function<Double, Double> twice = x -> 2 *x; in testAndThen()
52 Function<Double, Double> plusOne = x -> x + 1.0d; in testAndThen_null()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DLambdaTestHelpers.java59 public static final Consumer bEmpty = x -> { };
61 public static final IntConsumer bIntEmpty = x -> { };
63 public static final BiConsumer bBiEmpty = (x,y) -> { };
65 public static final Consumer bHashCode = x -> { Objects.hashCode(x); };
67 public static final BiConsumer bBiHashCode = (x,y) -> { Objects.hash(x, y); };
68 public static final Function<Integer, Integer> mZero = x -> 0;
69 public static final Function<Integer, Integer> mId = x -> x;
70 public static final Function<Integer, Integer> mDoubler = x -> x * 2;
79 public static final ToIntFunction<Integer> imDoubler = x -> x * 2;
80 public static final ToLongFunction<Long> lmDoubler = x -> x * 2;
[all …]
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DLambdaTestHelpers.java58 public static final Consumer bEmpty = x -> { };
60 public static final IntConsumer bIntEmpty = x -> { };
62 public static final BiConsumer bBiEmpty = (x,y) -> { };
64 public static final Consumer bHashCode = x -> { Objects.hashCode(x); };
66 public static final BiConsumer bBiHashCode = (x,y) -> { Objects.hash(x, y); };
67 public static final Function<Integer, Integer> mZero = x -> 0;
68 public static final Function<Integer, Integer> mId = x -> x;
69 public static final Function<Integer, Integer> mDoubler = x -> x * 2;
78 public static final ToIntFunction<Integer> imDoubler = x -> x * 2;
79 public static final ToLongFunction<Long> lmDoubler = x -> x * 2;
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DArraysTest.java49 Arrays.setAll(list, x -> x + 1); in setAll$I()
61 Arrays.setAll((int[]) null, (x -> x + 1)); in setAll$I()
77 Arrays.parallelSetAll(list, x -> x + 1); in parallelSetAll$I()
89 Arrays.parallelSetAll((int[]) null, (x -> x + 1)); in parallelSetAll$I()
105 Arrays.setAll(list, x -> x + 1); in setAll$L()
117 Arrays.setAll((long[]) null, (x -> x + 1)); in setAll$L()
133 Arrays.parallelSetAll(list, x -> x + 1); in parallelSetAll$L()
145 Arrays.parallelSetAll((long[]) null, (x -> x + 1)); in parallelSetAll$L()
161 Arrays.setAll(list, x -> x + 0.5); in setAll$D()
173 Arrays.setAll((double[]) null, x -> x + 0.5); in setAll$D()
[all …]

12345678910>>...18