Home
last modified time | relevance | path

Searched refs:elts (Results 1 – 7 of 7) sorted by relevance

/libcore/ojluni/src/main/java/java/util/
DStringJoiner.java71 private String[] elts; field in StringJoiner
166 final String[] elts = this.elts; in toString() local
167 if (elts == null && emptyValue != null) { in toString()
174 return size == 0 ? "" : elts[0]; in toString()
180 k += getChars(elts[0], chars, k); in toString()
183 k += getChars(elts[i], chars, k); in toString()
200 if (elts == null) { in add()
201 elts = new String[8]; in add()
203 if (size == elts.length) in add()
204 elts = Arrays.copyOf(elts, 2 * size); in add()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DNativeThreadSet.java34 private long[] elts; field in NativeThreadSet
39 elts = new long[n]; in NativeThreadSet()
52 if (used >= elts.length) { in add()
53 int on = elts.length; in add()
56 System.arraycopy(elts, 0, nelts, 0, on); in add()
57 elts = nelts; in add()
60 for (int i = start; i < elts.length; i++) { in add()
61 if (elts[i] == 0) { in add()
62 elts[i] = th; in add()
76 elts[i] = 0; in remove()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DBlockingQueueTest.java346 final Object[] elts = new Object[size];
351 q.add(elts[i] = makeElement(i));
354 assertEquals((pass == 0), q.contains(elts[i]));
355 assertEquals((pass == 0), q.remove(elts[i]));
356 assertFalse(q.contains(elts[i]));
357 assertTrue(q.contains(elts[i - 1]));
359 assertTrue(q.contains(elts[i + 1]));
363 assertTrue(q.contains(elts[0]));
365 assertTrue(q.contains(elts[i]));
366 assertFalse(q.contains(elts[i + 1]));
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DBlockingQueueTest.java370 final Object[] elts = new Object[size];
375 q.add(elts[i] = makeElement(i));
378 assertEquals((pass == 0), q.contains(elts[i]));
379 assertEquals((pass == 0), q.remove(elts[i]));
380 assertFalse(q.contains(elts[i]));
381 assertTrue(q.contains(elts[i - 1]));
383 assertTrue(q.contains(elts[i + 1]));
387 assertTrue(q.contains(elts[0]));
389 assertTrue(q.contains(elts[i]));
390 assertFalse(q.contains(elts[i + 1]));
[all …]
/libcore/ojluni/src/test/java/util/Collection/
DHotPotatoes.java105 Object[] elts = coll.toArray(); in testPotato() local
106 Assert.assertTrue(elts.length == 0 || (elts.length == 1 && elts[0] == one)); in testPotato()
/libcore/ojluni/src/test/java/util/PriorityQueue/
DForgetMeNot.java41 private static void checkQ(PriorityQueue<Integer> q, Integer...elts) { in checkQ() argument
42 check(Arrays.equals(q.toArray(), elts)); in checkQ() local
/libcore/ojluni/src/test/java/util/BitSet/
DBSMethods.java78 private static BitSet makeSet(int... elts) { in makeSet() argument
80 for (int elt : elts) in makeSet()