Home
last modified time | relevance | path

Searched refs:iterator (Results 1 – 25 of 183) sorted by relevance

12345678

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DCollationElementIteratorTest.java44 CollationElementIterator iterator = coll.getCollationElementIterator(text); in testGetOffset() local
46 int offset = iterator.getOffset(); in testGetOffset()
50 iterator.next(); in testGetOffset()
51 offset = iterator.getOffset(); in testGetOffset()
58 CollationElementIterator iterator = coll.getCollationElementIterator(text); in testNext() local
60 int order = iterator.next(); in testNext()
64 order = iterator.next(); in testNext()
67 int offset = iterator.getOffset(); in testNext()
70 iterator.reset(); in testNext()
71 order = iterator.previous(); in testNext()
[all …]
DBreakIteratorTest.java31 BreakIterator iterator; field in BreakIteratorTest
38 iterator = BreakIterator.getCharacterInstance(Locale.US); in setUp()
47 assertNotSame(newOne, iterator); in testCache()
48 assertEquals(newOne, iterator); in testCache()
51 assertEquals(newOne, iterator); in testCache()
54 assertEquals(newOne, iterator); in testCache()
57 assertFalse(wordIterator.equals(iterator)); in testCache()
60 assertFalse(lineIterator.equals(iterator)); in testCache()
63 assertFalse(senteIterator.equals(iterator)); in testCache()
67 BreakIterator cloned = (BreakIterator) iterator.clone(); in testClone()
[all …]
DRuleBasedCollatorTest.java111 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString() local
113 int offset = iterator.getOffset(); in testGetCollationElementIteratorString()
117 iterator.next(); in testGetCollationElementIteratorString()
118 offset = iterator.getOffset(); in testGetCollationElementIteratorString()
121 assertEquals(CollationElementIterator.NULLORDER, iterator.next()); in testGetCollationElementIteratorString()
128 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString() local
130 int offset = iterator.getOffset(); in testGetCollationElementIteratorString()
134 iterator.next(); in testGetCollationElementIteratorString()
135 offset = iterator.getOffset(); in testGetCollationElementIteratorString()
138 assertEquals(CollationElementIterator.NULLORDER, iterator.next()); in testGetCollationElementIteratorString()
[all …]
DSupport_Format.java81 protected static Vector<FieldContainer> findFields(AttributedCharacterIterator iterator) { in findFields() argument
83 while (iterator.getIndex() != iterator.getEndIndex()) { in findFields()
84 int start = iterator.getRunStart(); in findFields()
85 int end = iterator.getRunLimit(); in findFields()
87 Iterator<Attribute> it = iterator.getAttributes().keySet().iterator(); in findFields()
90 Object value = iterator.getAttribute(attribute); in findFields()
97 iterator.setIndex(end); in findFields()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTreeMapExtendTest.java1763 Iterator startIterator = entrySet.iterator(); in test_AscendingSubMap_subMap()
1767 Iterator endIterator = entrySet.iterator(); in test_AscendingSubMap_subMap()
1815 subMapSetIterator = subMap.entrySet().iterator(); in test_AscendingSubMap_subMap()
1824 subMapSetIterator = subMap.entrySet().iterator(); in test_AscendingSubMap_subMap()
1833 subMapSetIterator = subMap.entrySet().iterator(); in test_AscendingSubMap_subMap()
1842 subMapSetIterator = subMap.entrySet().iterator(); in test_AscendingSubMap_subMap()
1850 subMapSetIterator = subMap.entrySet().iterator(); in test_AscendingSubMap_subMap()
2413 Iterator it = values.iterator(); in test_DescendingSubMap_values()
2422 it = values.iterator(); in test_DescendingSubMap_values()
3425 Iterator iterator = entrySet.iterator(); in test_Entry_setValue() local
[all …]
DHashtableTest.java297 Iterator i = s.iterator(); in test_entrySet()
312 ((Map.Entry) ht10.entrySet().iterator().next()).setValue(null); in test_entrySet()
370 Iterator iterator = entrySet.iterator(); in test_hashCode() local
372 for (expectedHash = 0; iterator.hasNext(); expectedHash += iterator in test_hashCode()
482 Iterator it = map.keySet().iterator(); in test_keySet()
493 assertTrue("Wrong contents", map.keySet().iterator().next().equals( in test_keySet()
499 Iterator it2 = map2.keySet().iterator(); in test_keySet()
510 assertTrue("Wrong contents 2", map2.keySet().iterator().next().equals( in test_keySet()
535 Iterator it = set.iterator(); in test_keySet_subtest0()
780 Iterator<Map.Entry<String, String>> iterator = in test_entrySet_remove() local
[all …]
DLinkedHashMapTest.java222 Iterator i = s.iterator(); in test_entrySet()
242 s1.remove(m2.entrySet().iterator().next()); in entrySetRemoveHelper()
243 assertEquals("jumbo", s1.iterator().next().getKey()); in entrySetRemoveHelper()
260 assertNull("Failed with null key", m.keySet().iterator().next()); in test_keySet()
266 Iterator it = map.keySet().iterator(); in test_keySet()
278 assertTrue("Wrong contents", map.keySet().iterator().next().equals( in test_keySet()
284 Iterator it2 = map2.keySet().iterator(); in test_keySet()
295 assertTrue("Wrong contents 2", map2.keySet().iterator().next().equals( in test_keySet()
377 "value", values.iterator().next()); in test_clone()
379 "key", keys.iterator().next()); in test_clone()
[all …]
DAbstractCollectionTest.java35 public Iterator<Object> iterator() { in test_addLjava_lang_Object()
67 public Iterator<String> iterator() { in test_addAllLjava_util_Collection()
96 public Iterator<String> iterator() { in test_containsAllLjava_util_Collection()
118 public Iterator<Object> iterator() { in test_isEmpty()
141 public Iterator<String> iterator() { in test_removeAllLjava_util_Collection()
184 public Iterator<String> iterator() { in test_retainAllLjava_util_Collection()
221 public Iterator<String> iterator() { in test_toArray()
262 public Iterator<String> iterator() { in test_toArray$Ljava_lang_Object()
331 public Iterator<Object> iterator() { in test_toString()
DSortedMapTestBase.java99 Iterator<Integer> i = ref.keySet().iterator(); in testKeySet()
100 Iterator<Integer> j = map.keySet().iterator(); in testKeySet()
171 Iterator<Integer> i = ref.values().iterator(); in testValues()
172 Iterator<Integer> j = map.values().iterator(); in testValues()
230 Map.Entry<Integer, Integer> refE = ref.entrySet().iterator().next(); in testSubMap()
231 Map.Entry<Integer, Integer> mapE = map.entrySet().iterator().next(); in testSubMap()
268 assertTrue("Should not have entries", !map.entrySet().iterator() in testIsEmpty2()
275 assertTrue("Should not have entries", !map.entrySet().iterator() in testIsEmpty2()
282 assertFalse(map.entrySet().iterator().hasNext()); in testIsEmpty2()
283 assertFalse(map.keySet().iterator().hasNext()); in testIsEmpty2()
[all …]
DEnumSetTest.java145 Iterator<HugeEnumCount> iterator = set.iterator(); in testRemoveIteratorRemoveFromHugeEnumSet() local
146 assertTrue(iterator.hasNext()); in testRemoveIteratorRemoveFromHugeEnumSet()
147 assertEquals(HugeEnumCount.NO64, iterator.next()); in testRemoveIteratorRemoveFromHugeEnumSet()
148 assertTrue(iterator.hasNext()); in testRemoveIteratorRemoveFromHugeEnumSet()
149 iterator.remove(); in testRemoveIteratorRemoveFromHugeEnumSet()
150 assertEquals(HugeEnumCount.NO65, iterator.next()); in testRemoveIteratorRemoveFromHugeEnumSet()
151 assertTrue(iterator.hasNext()); in testRemoveIteratorRemoveFromHugeEnumSet()
152 assertEquals(HugeEnumCount.NO128, iterator.next()); in testRemoveIteratorRemoveFromHugeEnumSet()
153 assertFalse(iterator.hasNext()); in testRemoveIteratorRemoveFromHugeEnumSet()
155 iterator.remove(); in testRemoveIteratorRemoveFromHugeEnumSet()
[all …]
DIdentityHashMap2Test.java143 "value", values.iterator().next()); in test_clone()
145 "key", keys.iterator().next()); in test_clone()
152 "value2", values2.iterator().next()); in test_clone()
158 "key2", key2.iterator().next()); in test_clone()
213 Iterator i = s.iterator(); in test_entrySet()
266 assertNull("Failed with null key", m.keySet().iterator().next()); in test_keySet()
272 Iterator it = map.keySet().iterator(); in test_keySet()
284 assertTrue("Wrong contents", map.keySet().iterator().next().equals( in test_keySet()
290 Iterator it2 = map2.keySet().iterator(); in test_keySet()
301 assertTrue("Wrong contents 2", map2.keySet().iterator().next().equals( in test_keySet()
/libcore/luni/src/test/java/libcore/java/util/
DOldLinkedHashMapTest.java35 Iterator iterator = map.keySet().iterator(); in testLinkedHashMap() local
36 String id = (String) iterator.next(); in testLinkedHashMap()
39 iterator.next(); in testLinkedHashMap()
51 iterator = map.keySet().iterator(); in testLinkedHashMap()
52 id = (String) iterator.next(); in testLinkedHashMap()
54 iterator.next(); in testLinkedHashMap()
DTreeMapTest.java42 Iterator<Entry<String, String>> iterator = map.entrySet().iterator(); in testEntrySetSetValue() local
43 Entry<String, String> entryA = iterator.next(); in testEntrySetSetValue()
47 Entry<String, String> entryB = iterator.next(); in testEntrySetSetValue()
49 Entry<String, String> entryC = iterator.next(); in testEntrySetSetValue()
69 Iterator<Entry<String, String>> iterator = subMap.entrySet().iterator(); in testSubMapEntrySetSetValue() local
70 Entry<String, String> entryA = iterator.next(); in testSubMapEntrySetSetValue()
75 Entry<String, String> entryB = iterator.next(); in testSubMapEntrySetSetValue()
77 Entry<String, String> entryC = iterator.next(); in testSubMapEntrySetSetValue()
142 Iterator<Entry<String,String>> iterator = map.entrySet().iterator(); in testConcurrentModificationDetection() local
143 iterator.next(); in testConcurrentModificationDetection()
[all …]
DServiceLoaderTest.java26 assertFalse(ServiceLoader.load(UnimplementedInterface.class).iterator().hasNext()); in test_noImplementations()
33 Iterator<ServiceLoaderTestInterface> it = loader.iterator(); in test_implementations()
44 ServiceLoader.load(ServiceLoaderTestInterfaceMissingClass.class).iterator().next(); in test_missingRegisteredClass()
55 ServiceLoader.load(ServiceLoaderTestInterfaceWrongType.class).iterator().next(); in test_wrongTypeRegisteredClass()
65 ServiceLoader.load(ServiceLoaderTestInterfaceParseError.class).iterator().next(); in test_invalidRegisteredClass()
DCollectionsTest.java42 testEmptyIterator(Collections.emptyList().iterator()); in testEmptyIterator()
43 testEmptyIterator(Collections.emptySet().iterator()); in testEmptyIterator()
44 testEmptyIterator(Collections.emptyMap().keySet().iterator()); in testEmptyIterator()
45 testEmptyIterator(Collections.emptyMap().entrySet().iterator()); in testEmptyIterator()
46 testEmptyIterator(Collections.emptyMap().values().iterator()); in testEmptyIterator()
/libcore/luni/src/main/java/java/text/
DAttributedString.java163 Iterator<Range> it = ranges.iterator(); in inRange()
192 .entrySet().iterator(); in getAllAttributeKeys()
207 Iterator<Range> it = ranges.iterator(); in currentValue()
235 .entrySet().iterator(); in getAttributes()
286 Iterator<? extends Attribute> it = attributes.iterator(); in getRunLimit()
303 Iterator<Range> it = ranges.iterator(); in runStart()
334 Iterator<? extends Attribute> it = attributes.iterator(); in getRunStart()
388 public AttributedString(AttributedCharacterIterator iterator) { in AttributedString() argument
389 if (iterator.getBeginIndex() > iterator.getEndIndex()) { in AttributedString()
393 for (int i = iterator.getBeginIndex(); i < iterator.getEndIndex(); i++) { in AttributedString()
[all …]
DCollationElementIterator.java64 CollationElementIterator(CollationElementIteratorICU iterator) { in CollationElementIterator() argument
65 this.icuIterator = iterator; in CollationElementIterator()
/libcore/support/src/test/java/tests/support/
DSupport_MapTest2.java42 assertTrue("Should not have entries", !map.entrySet().iterator() in runTest()
44 assertTrue("Should not have keys", !map.keySet().iterator() in runTest()
46 assertTrue("Should not have values", !map.values().iterator() in runTest()
56 assertTrue("Should not have entries", !map.entrySet().iterator() in runTest()
58 assertTrue("Should not have keys", !map.keySet().iterator() in runTest()
60 assertTrue("Should not have values", !map.values().iterator() in runTest()
DSupport_Format.java84 protected static Vector<FieldContainer> findFields(AttributedCharacterIterator iterator) { in findFields() argument
86 while (iterator.getIndex() != iterator.getEndIndex()) { in findFields()
87 int start = iterator.getRunStart(); in findFields()
88 int end = iterator.getRunLimit(); in findFields()
90 Iterator<Attribute> it = iterator.getAttributes().keySet().iterator(); in findFields()
93 Object value = iterator.getAttribute(attribute); in findFields()
100 iterator.setIndex(end); in findFields()
/libcore/luni/src/main/java/java/util/
DAbstractCollection.java74 Iterator<? extends E> it = collection.iterator(); in addAll()
100 Iterator<E> it = iterator(); in clear()
127 Iterator<E> it = iterator(); in contains()
165 Iterator<?> it = collection.iterator(); in containsAll()
198 public abstract Iterator<E> iterator(); in iterator() method in AbstractCollection
225 Iterator<?> it = iterator(); in remove()
275 Iterator<?> it = iterator(); in removeAll()
316 Iterator<?> it = iterator(); in retainAll()
370 Iterator<?> it = iterator(); in toString()
DAbstractList.java171 private final ListIterator<E> iterator; field in AbstractList.SubAbstractList.SubAbstractListIterator
179 iterator = it; in SubAbstractListIterator()
186 iterator.add(object); in add()
192 return iterator.nextIndex() < end; in hasNext()
196 return iterator.previousIndex() >= start; in hasPrevious()
200 if (iterator.nextIndex() < end) { in next()
201 return iterator.next(); in next()
207 return iterator.nextIndex() - start; in nextIndex()
211 if (iterator.previousIndex() >= start) { in previous()
212 return iterator.previous(); in previous()
[all …]
DAbstractSet.java77 Iterator<?> it = iterator(); in hashCode()
100 Iterator<?> it = iterator(); in removeAll()
108 Iterator<?> it = collection.iterator(); in removeAll()
DAbstractMap.java190 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in containsKey()
214 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in containsValue()
282 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in get()
309 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in hashCode()
342 @Override public Iterator<K> iterator() { in keySet()
344 Iterator<Map.Entry<K, V>> setIterator = entrySet().iterator(); in keySet()
392 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in remove()
436 Iterator<Map.Entry<K, V>> it = entrySet().iterator(); in toString()
477 @Override public Iterator<V> iterator() { in values()
479 Iterator<Map.Entry<K, V>> setIterator = entrySet().iterator(); in values()
/libcore/luni/src/main/java/javax/security/auth/
DSubject.java420 Iterator<?> it = principals.iterator(); in toString()
427 it = publicCredentials.iterator(); in toString()
435 it = privateCredentials.iterator(); in toString()
588 public Iterator<SST> iterator() { in iterator() method in Subject.SecureSet
595 return new SecureIterator(elements.iterator()) { in iterator()
602 SST obj = iterator.next(); in iterator()
607 return new SecureIterator(elements.iterator()); in iterator()
651 public Iterator<E> iterator() { in get()
652 return elements.iterator(); in get()
720 protected Iterator<SST> iterator; field in SecureIterator
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DCopyOnWriteArraySet.java304 public Iterator<E> iterator() { in iterator() method in CopyOnWriteArraySet
305 return al.iterator(); in iterator()
330 Iterator<?> it = set.iterator(); in equals()

12345678