Home
last modified time | relevance | path

Searched refs:it (Results 1 – 25 of 214) sorted by relevance

123456789

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DAttributedCharacterIteratorTest.java32 AttributedCharacterIterator it = attrString.getIterator(); in test_current() local
33 assertEquals("Wrong first", 'T', it.current()); in test_current()
34 it.next(); in test_current()
35 assertEquals("Wrong second", 'e', it.current()); in test_current()
37 it.next(); in test_current()
38 assertEquals("Wrong last", 'g', it.current()); in test_current()
39 it.next(); in test_current()
40 assertTrue("Wrong final", it.current() == CharacterIterator.DONE); in test_current()
42 it = attrString.getIterator(null, 2, 8); in test_current()
43 assertEquals("Wrong first2", 's', it.current()); in test_current()
[all …]
DBreakIteratorTest.java181 BreakIterator it = BreakIterator.getCharacterInstance(Locale.US); in testGetCharacterInstanceLocale() local
183 assertEquals(it, it2); in testGetCharacterInstanceLocale()
190 BreakIterator it = BreakIterator.getLineInstance(); in testGetLineInstance() local
191 assertNotNull(it); in testGetLineInstance()
198 BreakIterator it = BreakIterator.getLineInstance(Locale.US); in testGetLineInstanceLocale() local
199 assertNotNull(it); in testGetLineInstanceLocale()
207 BreakIterator it = BreakIterator.getSentenceInstance(); in testGetSentenceInstance() local
208 assertNotNull(it); in testGetSentenceInstance()
215 BreakIterator it = BreakIterator.getSentenceInstance(Locale.US); in testGetSentenceInstanceLocale() local
216 assertNotNull(it); in testGetSentenceInstanceLocale()
[all …]
DStringCharacterIteratorTest.java155 StringCharacterIterator it = new StringCharacterIterator("testing", 2, in test_clone() local
157 StringCharacterIterator clone = (StringCharacterIterator) it.clone(); in test_clone()
158 assertTrue("Clone not equal", it.equals(clone)); in test_clone()
170 StringCharacterIterator it = in test_current() local
172 assertEquals("Wrong current char", 'i', it.current()); in test_current()
407 StringCharacterIterator it = new StringCharacterIterator("testing"); in test_ConstructorLjava_lang_String() local
408 assertEquals("Wrong begin index", 0, it.getBeginIndex()); in test_ConstructorLjava_lang_String()
409 assertEquals("Wrong end index", 7, it.getEndIndex()); in test_ConstructorLjava_lang_String()
410 assertEquals("Wrong current index", 0, it.getIndex()); in test_ConstructorLjava_lang_String()
411 assertEquals("Wrong current char", 't', it.current()); in test_ConstructorLjava_lang_String()
[all …]
DAttributedStringTest.java35 AttributedCharacterIterator it = attrString.getIterator(); in test_ConstructorLjava_lang_String() local
37 buf.append(it.first()); in test_ConstructorLjava_lang_String()
39 while ((ch = it.next()) != CharacterIterator.DONE) in test_ConstructorLjava_lang_String()
123 AttributedCharacterIterator it = as.getIterator(); in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII() local
124 assertEquals("non-null value limit", 2, it in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
130 it = as.getIterator(); in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
131 assertEquals("null value limit", 4, it in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
/libcore/ojluni/src/main/java/java/util/
DAbstractCollection.java103 Iterator<E> it = iterator(); in contains() local
105 while (it.hasNext()) in contains()
106 if (it.next()==null) in contains()
109 while (it.hasNext()) in contains()
110 if (o.equals(it.next())) in contains()
142 Iterator<E> it = iterator(); in toArray() local
144 if (! it.hasNext()) // fewer elements than expected in toArray()
146 r[i] = it.next(); in toArray()
148 return it.hasNext() ? finishToArray(r, it) : r; in toArray()
186 Iterator<E> it = iterator(); in toArray() local
[all …]
DReverseOrderListView.java82 final ListIterator<E> it = base.listIterator(base.size()); field in ReverseOrderListView.DescendingIterator
83 public boolean hasNext() { return it.hasPrevious(); } in hasNext()
84 public E next() { return it.previous(); } in next()
87 it.remove(); in remove()
93 final ListIterator<E> it; field in ReverseOrderListView.DescendingListIterator
98 it = base.listIterator(size - pos); in DescendingListIterator()
102 return it.hasPrevious(); in hasNext()
106 return it.previous(); in next()
110 return it.hasNext(); in hasPrevious()
114 return it.next(); in previous()
[all …]
DSequencedMap.java152 var it = entrySet().iterator(); in firstEntry() local
153 return it.hasNext() ? new NullableKeyValueHolder<>(it.next()) : null; in firstEntry()
169 var it = reversed().entrySet().iterator(); in lastEntry() local
170 return it.hasNext() ? new NullableKeyValueHolder<>(it.next()) : null; in lastEntry()
188 var it = entrySet().iterator(); in pollFirstEntry() local
189 if (it.hasNext()) { in pollFirstEntry()
190 var entry = new NullableKeyValueHolder<>(it.next()); in pollFirstEntry()
191 it.remove(); in pollFirstEntry()
213 var it = reversed().entrySet().iterator(); in pollLastEntry() local
214 if (it.hasNext()) { in pollLastEntry()
[all …]
DReverseOrderDequeView.java105 Iterator<E> it = iterator(); in remove() local
107 while (it.hasNext()) { in remove()
108 if (it.next()==null) { in remove()
109 it.remove(); in remove()
114 while (it.hasNext()) { in remove()
115 if (o.equals(it.next())) { in remove()
116 it.remove(); in remove()
128 Iterator<?> it = iterator(); in removeAll() local
129 while (it.hasNext()) { in removeAll()
130 if (c.contains(it.next())) { in removeAll()
[all …]
DSequencedCollection.java176 var it = this.iterator(); in removeFirst() local
177 E e = it.next(); in removeFirst()
178 it.remove(); in removeFirst()
198 var it = this.reversed().iterator(); in removeLast() local
199 E e = it.next(); in removeLast()
200 it.remove(); in removeLast()
/libcore/ojluni/src/test/java/util/PriorityQueue/
DForgetMeNot.java45 private static void noMoreElements(final Iterator<Integer> it) { in noMoreElements() argument
47 THROWS(NoSuchElementException.class, () -> it.next()); in noMoreElements()
48 check(! it.hasNext()); in noMoreElements()
52 private static void removeIsCurrentlyIllegal(final Iterator<Integer> it) { in removeIsCurrentlyIllegal() argument
54 THROWS(IllegalStateException.class, () -> it.remove()); in removeIsCurrentlyIllegal()
58 private static void remove(Iterator<Integer> it, in remove() argument
61 it.remove(); in remove()
62 removeIsCurrentlyIllegal(it); in remove()
68 Iterator<Integer> it; in realMain() local
76 it = q.iterator(); in realMain()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DBreakIteratorTest.java58 BreakIterator it = BreakIterator.getWordInstance(Locale.US); in testStress() local
59 it.setText(new String(cs)); in testStress()
73 BreakIterator it = BreakIterator.getWordInstance(Locale.US); in testWordBoundaries() local
74 it.setText(s); in testWordBoundaries()
78 it.setText(s); in testWordBoundaries()
81 BreakIterator clone = (BreakIterator) it.clone(); in testWordBoundaries()
83 assertExpectedWordBoundaries(it, s); in testWordBoundaries()
87 private void assertExpectedWordBoundaries(BreakIterator it, String s) { in assertExpectedWordBoundaries() argument
89 int pos = it.first(); in assertExpectedWordBoundaries()
93 pos = it.next(); in assertExpectedWordBoundaries()
[all …]
DOldAttributedCharacterIteratorTest.java29 AttributedCharacterIterator it; field in OldAttributedCharacterIteratorTest
36 AttributedCharacterIterator it = as.getIterator(); in test_getRunLimitLSet() local
41 2, it.getRunLimit(attr)); in test_getRunLimitLSet()
46 it = as.getIterator(); in test_getRunLimitLSet()
48 4, it.getRunLimit(attr)); in test_getRunLimitLSet()
52 4, it.getRunLimit(attr)); in test_getRunLimitLSet()
57 AttributedCharacterIterator it = as.getIterator(); in test_getAllAttributeKeys() local
59 it.getAllAttributeKeys(); in test_getAllAttributeKeys()
67 it = as.getIterator(); in test_getAllAttributeKeys()
69 it.getAllAttributeKeys(); in test_getAllAttributeKeys()
[all …]
DOldAttributedStringTest.java31 AttributedCharacterIterator it = attrString.getIterator(); in assertEqualString() local
33 buf.append(it.first()); in assertEqualString()
35 while ((ch = it.next()) != CharacterIterator.DONE) in assertEqualString()
169 AttributedCharacterIterator it = attrString.getIterator(); in test_ConstructorLjava_lang_StringLjava_util_Map() local
171 buf.append(it.first()); in test_ConstructorLjava_lang_StringLjava_util_Map()
173 while ((ch = it.next()) != CharacterIterator.DONE) in test_ConstructorLjava_lang_StringLjava_util_Map()
283 AttributedCharacterIterator it = as.getIterator(); in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII() local
284 assertEquals("non-null value limit", 2, it in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
290 it = as.getIterator(); in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
291 assertEquals("null value limit", 4, it in test_addAttributeLjava_text_AttributedCharacterIterator$AttributeLjava_lang_ObjectII()
[all …]
/libcore/ojluni/src/test/java/util/Collections/
DSingletonIterator.java44 static void assertIteratorExhausted(Iterator<?> it) { in assertIteratorExhausted() argument
45 assertFalse(it.hasNext()); in assertIteratorExhausted()
47 it.next(); in assertIteratorExhausted()
50 it.forEachRemaining(e -> { throw new AssertionError("action called incorrectly"); }); in assertIteratorExhausted()
54 Iterator<String> it = Collections.singleton("TheOne").iterator(); in testForEachRemaining() local
57 it.forEachRemaining(s -> { in testForEachRemaining()
63 assertIteratorExhausted(it); in testForEachRemaining()
69 Iterator<String> it = Collections.singleton("TheOne").iterator(); in testThrowFromForEachRemaining() local
72 it.forEachRemaining(s -> { throw new SingletonException(); }); in testThrowFromForEachRemaining()
75 assertIteratorExhausted(it); in testThrowFromForEachRemaining()
/libcore/ojluni/src/test/java/util/WeakHashMap/
DGCDuringIteration.java113 void checkIterator(final Iterator<Map.Entry<Foo, Integer>> it, int first) { in checkIterator() argument
115 if (rnd.nextBoolean()) check(it.hasNext()); in checkIterator()
116 equal(it.next().getValue(), i); in checkIterator()
120 it.next(); in checkIterator()
126 check(! it.hasNext()); in checkIterator()
150 final Iterator<Map.Entry<Foo,Integer>> it = map.entrySet().iterator(); in test() local
153 checkIterator(it, first-1); in test()
160 final Iterator<Map.Entry<Foo,Integer>> it = map.entrySet().iterator(); in test() local
161 it.next(); // protects first entry in test()
168 checkIterator(it, first-1); in test()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_UnmodifiableCollectionTest.java72 Iterator<Integer> it = col.iterator(); in runTest() local
74 while (it.hasNext()) { in runTest()
75 ss.add(it.next()); in runTest()
77 it = ss.iterator(); in runTest()
78 for (int counter = 0; it.hasNext(); counter++) { in runTest()
79 int nextValue = it.next().intValue(); in runTest()
94 for (int counter = 0; it.hasNext(); counter++) { in runTest()
97 objArray[counter] == it.next()); in runTest()
103 for (int counter = 0; it.hasNext(); counter++) { in runTest()
106 objArray[counter] == it.next()); in runTest()
/libcore/ojluni/src/test/java/util/Collection/
DIteratorAtEnd.java204 final Iterator it = c.iterator(); in test() local
208 it.next(); in test()
212 it.remove(); in test()
223 final ListIterator it = list.listIterator(0); in test() local
224 it.next(); in test()
225 final Object x = it.previous(); in test()
226 THROWS(NoSuchElementException.class, it::previous); in test()
228 it.remove(); in test()
238 final ListIterator it = list.listIterator(list.size()); in test() local
239 it.previous(); in test()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DLinkedListTest.java429 Iterator it = q.iterator(); in testIterator() local
431 for (i = 0; it.hasNext(); i++) in testIterator()
432 assertTrue(q.contains(it.next())); in testIterator()
434 assertIteratorExhausted(it); in testIterator()
453 for (Iterator it = q.iterator(); it.hasNext();) { in testIteratorOrdering()
454 assertEquals(++k, it.next()); in testIteratorOrdering()
468 Iterator it = q.iterator(); in testIteratorRemove() local
469 assertEquals(1, it.next()); in testIteratorRemove()
470 it.remove(); in testIteratorRemove()
471 it = q.iterator(); in testIteratorRemove()
[all …]
DConcurrentLinkedDequeTest.java735 Iterator it = q.iterator(); in testIterator() local
737 for (i = 0; it.hasNext(); i++) in testIterator()
738 assertTrue(q.contains(it.next())); in testIterator()
740 assertIteratorExhausted(it); in testIterator()
762 for (Iterator it = q.iterator(); it.hasNext();) { in testIteratorOrdering()
763 assertEquals(++k, it.next()); in testIteratorOrdering()
778 for (Iterator it = q.iterator(); it.hasNext();) { in testWeaklyConsistentIteration()
780 it.next(); in testWeaklyConsistentIteration()
797 Iterator it = q.iterator(); in testIteratorRemove() local
799 assertEquals(it.next(), new Integer(j)); in testIteratorRemove()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DLinkedListTest.java388 Iterator it = q.iterator(); in testIterator() local
390 for (i = 0; it.hasNext(); i++) in testIterator()
391 assertTrue(q.contains(it.next())); in testIterator()
393 assertIteratorExhausted(it); in testIterator()
412 for (Iterator it = q.iterator(); it.hasNext();) { in testIteratorOrdering()
413 assertEquals(++k, it.next()); in testIteratorOrdering()
427 Iterator it = q.iterator(); in testIteratorRemove() local
428 assertEquals(1, it.next()); in testIteratorRemove()
429 it.remove(); in testIteratorRemove()
430 it = q.iterator(); in testIteratorRemove()
[all …]
DConcurrentLinkedDequeTest.java701 Iterator it = q.iterator(); in testIterator() local
703 for (i = 0; it.hasNext(); i++) in testIterator()
704 assertTrue(q.contains(it.next())); in testIterator()
706 assertIteratorExhausted(it); in testIterator()
728 for (Iterator it = q.iterator(); it.hasNext();) { in testIteratorOrdering()
729 assertEquals(++k, it.next()); in testIteratorOrdering()
744 for (Iterator it = q.iterator(); it.hasNext();) { in testWeaklyConsistentIteration()
746 it.next(); in testWeaklyConsistentIteration()
763 Iterator it = q.iterator(); in testIteratorRemove() local
765 assertEquals(it.next(), Integer.valueOf(j)); in testIteratorRemove()
[all …]
DArrayDequeTest.java636 Iterator it = q.iterator(); in checkToArray() local
638 Integer x = (Integer) it.next(); in checkToArray()
678 Iterator it = q.iterator(); in checkToArray2() local
680 Integer x = (Integer) it.next(); in checkToArray2()
747 Iterator it = q.iterator(); in testIterator() local
749 for (i = 0; it.hasNext(); i++) in testIterator()
750 assertTrue(q.contains(it.next())); in testIterator()
752 assertIteratorExhausted(it); in testIterator()
773 for (Iterator it = q.iterator(); it.hasNext();) { in testIteratorOrdering()
774 assertEquals(++k, it.next()); in testIteratorOrdering()
[all …]
/libcore/luni/src/main/native/
DAsynchronousCloseMonitor.cpp95 for (AsynchronousCloseMonitorImpl* it = blockedThreadList; it != NULL; it = it->mNext) { in signalBlockedThreads() local
96 if (it->mFd == fd) { in signalBlockedThreads()
97 it->mSignaled = true; in signalBlockedThreads()
98 pthread_kill(it->mThread, BLOCKED_THREAD_SIGNAL); in signalBlockedThreads()
/libcore/luni/src/test/java/libcore/java/util/
DServiceLoaderTest.java34 Iterator<ServiceLoaderTestInterface> it = loader.iterator(); in test_implementations() local
35 assertTrue(it.hasNext()); in test_implementations()
36 assertTrue(it.next() instanceof Impl1); in test_implementations()
37 assertTrue(it.hasNext()); in test_implementations()
38 assertTrue(it.next() instanceof Impl2); in test_implementations()
39 assertFalse(it.hasNext()); in test_implementations()
90 Iterator<ServiceLoaderTestInterface> it = loader.iterator(); in testLoadInstalled() local
93 assertFalse(it.hasNext()); in testLoadInstalled()
/libcore/benchmarks/src/benchmarks/regression/
DBreakIteratorBenchmark.java52 BreakIterator it = BreakIterator.getLineInstance(text.locale); in timeBreakIterator() local
53 it.setText(text.text); in timeBreakIterator()
55 while (it.next() != BreakIterator.DONE) { in timeBreakIterator()
62 android.icu.text.BreakIterator it = in timeIcuBreakIterator() local
64 it.setText(text.text); in timeIcuBreakIterator()
66 while (it.next() != android.icu.text.BreakIterator.DONE) { in timeIcuBreakIterator()

123456789