Home
last modified time | relevance | path

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

12345678910>>...14

/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryMappedFileTest.java103 BufferIterator iterator = memoryMappedFile.bigEndianIterator(); in testReadAfterCloseFails() local
107 iterator.readByte(); in testReadAfterCloseFails()
124 BufferIterator iterator = iteratorFactory.apply(mappedFile); in checkReadByte() local
126 assertReadByteSucceeds(iterator, bytes[i]); in checkReadByte()
130 iterator.seek(0); in checkReadByte()
132 assertReadByteSucceeds(iterator, bytes[i]); in checkReadByte()
133 iterator.skip(1); in checkReadByte()
152 BufferIterator iterator = iteratorFactory.apply(mappedFile); in checkSeek() local
153 seekRead(bytes, iterator, 2); in checkSeek()
155 seekRead(bytes, iterator, 0); in checkSeek()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
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 …]
DCollationElementIteratorTest.java47 CollationElementIterator iterator = coll.getCollationElementIterator(text); in testGetOffset() local
49 int offset = iterator.getOffset(); in testGetOffset()
53 iterator.next(); in testGetOffset()
54 offset = iterator.getOffset(); in testGetOffset()
61 CollationElementIterator iterator = coll.getCollationElementIterator(text); in testNext() local
63 int order = iterator.next(); in testNext()
67 order = iterator.next(); in testNext()
70 int offset = iterator.getOffset(); in testNext()
73 iterator.reset(); in testNext()
74 order = iterator.previous(); in testNext()
[all …]
DRuleBasedCollatorTest.java105 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString() local
107 int offset = iterator.getOffset(); in testGetCollationElementIteratorString()
111 iterator.next(); in testGetCollationElementIteratorString()
112 offset = iterator.getOffset(); in testGetCollationElementIteratorString()
115 assertEquals(CollationElementIterator.NULLORDER, iterator.next()); in testGetCollationElementIteratorString()
122 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString() local
124 int offset = iterator.getOffset(); in testGetCollationElementIteratorString()
128 iterator.next(); in testGetCollationElementIteratorString()
129 offset = iterator.getOffset(); in testGetCollationElementIteratorString()
132 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 …]
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()
DLinkedHashMapTest.java228 Iterator i = s.iterator(); in test_entrySet()
248 s1.remove(m2.entrySet().iterator().next()); in entrySetRemoveHelper()
249 assertEquals("jumbo", s1.iterator().next().getKey()); in entrySetRemoveHelper()
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()
383 "value", values.iterator().next()); in test_clone()
385 "key", keys.iterator().next()); in test_clone()
[all …]
/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()
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()
DTreeMapTest.java50 Iterator<Entry<String, String>> iterator = map.entrySet().iterator(); in testEntrySetSetValue() local
51 Entry<String, String> entryA = iterator.next(); in testEntrySetSetValue()
55 Entry<String, String> entryB = iterator.next(); in testEntrySetSetValue()
57 Entry<String, String> entryC = iterator.next(); in testEntrySetSetValue()
77 Iterator<Entry<String, String>> iterator = subMap.entrySet().iterator(); in testSubMapEntrySetSetValue() local
78 Entry<String, String> entryA = iterator.next(); in testSubMapEntrySetSetValue()
83 Entry<String, String> entryB = iterator.next(); in testSubMapEntrySetSetValue()
85 Entry<String, String> entryC = iterator.next(); in testSubMapEntrySetSetValue()
150 Iterator<Entry<String,String>> iterator = map.entrySet().iterator(); in testConcurrentModificationDetection() local
151 iterator.next(); in testConcurrentModificationDetection()
[all …]
DForEachRemainingTester.java72 collection.iterator().forEachRemaining((T i) -> recorder.add(i)); in test_forEachRemaining()
77 Iterator<T> it = collection.iterator(); in test_forEachRemaining()
92 collection.iterator().forEachRemaining(null); in test_forEachRemaining_NPE()
102 collection.iterator().forEachRemaining(i -> collection.add(i)); in test_forEachRemaining_CME()
111 collection.iterator().forEachRemaining(null); in test_forEachRemaining_NPE_list()
121 collection.iterator().forEachRemaining(i -> collection.add(i)); in test_forEachRemaining_CME_list()
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DStreamReuseTest.java135 Stream::iterator, Stream::iterator, in testTwoIterators()
143 Stream::iterator, Stream::findFirst, in testTerminalIterator()
147 Stream::findFirst, Stream::iterator, in testTerminalIterator()
155 Stream::iterator, (Stream<Integer> s) -> s.map(i -> i), in testStreamIterator()
159 (Stream<Integer> s) -> s.map(i -> i), Stream::iterator, in testStreamIterator()
163 Stream::iterator, Stream::distinct, in testStreamIterator()
167 Stream::distinct, Stream::iterator, in testStreamIterator()
225 IntStream::iterator, IntStream::iterator, in testTwoIterators()
233 IntStream::iterator, IntStream::sum, in testTerminalIterator()
237 IntStream::sum, IntStream::iterator, in testTerminalIterator()
[all …]
/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/ojluni/src/main/java/sun/util/
DResourceBundleEnumeration.java40 Iterator<String> iterator; field in ResourceBundleEnumeration
51 this.iterator = set.iterator(); in ResourceBundleEnumeration()
59 if (iterator.hasNext()) { in hasMoreElements()
60 next = iterator.next(); in hasMoreElements()
/libcore/ojluni/src/main/java/java/util/
DSpliterators.java448 public static <T> Spliterator<T> spliterator(Iterator<? extends T> iterator, in spliterator() argument
451 return new IteratorSpliterator<>(Objects.requireNonNull(iterator), size, in spliterator()
476 public static <T> Spliterator<T> spliteratorUnknownSize(Iterator<? extends T> iterator, in spliteratorUnknownSize() argument
478 return new IteratorSpliterator<>(Objects.requireNonNull(iterator), characteristics); in spliteratorUnknownSize()
505 public static Spliterator.OfInt spliterator(PrimitiveIterator.OfInt iterator, in spliterator() argument
508 return new IntIteratorSpliterator(Objects.requireNonNull(iterator), in spliterator()
533 public static Spliterator.OfInt spliteratorUnknownSize(PrimitiveIterator.OfInt iterator, in spliteratorUnknownSize() argument
535 return new IntIteratorSpliterator(Objects.requireNonNull(iterator), characteristics); in spliteratorUnknownSize()
562 public static Spliterator.OfLong spliterator(PrimitiveIterator.OfLong iterator, in spliterator() argument
565 return new LongIteratorSpliterator(Objects.requireNonNull(iterator), in spliterator()
[all …]
DAbstractCollection.java76 public abstract Iterator<E> iterator(); in iterator() method in AbstractCollection
99 Iterator<E> it = iterator(); in contains()
137 Iterator<E> it = iterator(); in toArray()
180 Iterator<E> it = iterator(); in toArray()
282 Iterator<E> it = iterator(); in remove()
373 Iterator<?> it = iterator(); in removeAll()
407 Iterator<E> it = iterator(); in retainAll()
433 Iterator<E> it = iterator(); in clear()
454 Iterator<E> it = iterator(); in toString()
DAbstractMap.java112 Iterator<Entry<K,V>> i = entrySet().iterator(); in containsValue()
144 Iterator<Map.Entry<K,V>> i = entrySet().iterator(); in containsKey()
176 Iterator<Entry<K,V>> i = entrySet().iterator(); in get()
235 Iterator<Entry<K,V>> i = entrySet().iterator(); in remove()
350 public Iterator<K> iterator() { in keySet()
352 private Iterator<Entry<K,V>> i = entrySet().iterator(); in keySet()
409 public Iterator<V> iterator() { in values()
411 private Iterator<Entry<K,V>> i = entrySet().iterator(); in values()
486 Iterator<Entry<K,V>> i = entrySet().iterator(); in equals()
528 Iterator<Entry<K,V>> i = entrySet().iterator(); in hashCode()
[all …]
/libcore/ojluni/src/main/java/java/text/
DAttributedString.java98 AttributedCharacterIterator iterator = iterators[counter]; in AttributedString() local
99 int start = iterator.getBeginIndex(); in AttributedString()
100 int end = iterator.getEndIndex(); in AttributedString()
104 iterator.setIndex(index); in AttributedString()
106 Map<Attribute,Object> attrs = iterator.getAttributes(); in AttributedString()
112 index = iterator.getRunLimit(); in AttributedString()
164 … Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator = attributes.entrySet().iterator(); in AttributedString() local
165 while (iterator.hasNext()) { in AttributedString()
166 Map.Entry<? extends Attribute, ?> entry = iterator.next(); in AttributedString()
270 Iterator<Attribute> itr = keys.iterator(); in AttributedString()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixDirectoryStream.java62 private Iterator<Path> iterator; field in UnixDirectoryStream
124 protected final Iterator<Path> iterator(DirectoryStream<Path> ds) { in iterator() method in UnixDirectoryStream
129 if (iterator != null) in iterator()
131 iterator = new UnixDirectoryIterator(ds); in iterator()
132 return iterator; in iterator()
137 public Iterator<Path> iterator() { in iterator() method in UnixDirectoryStream
138 return iterator(this); in iterator()
/libcore/ojluni/src/main/java/javax/security/auth/
DSubject.java857 Iterator<Principal> pI = principals.iterator();
866 Iterator<Object> pI = pubCredentials.iterator();
877 Iterator<Object> pI = privCredentials.iterator();
922 Iterator<Principal> pIterator = principals.iterator();
930 Iterator<Object> pubCIterator = pubCredentials.iterator();
1047 public Iterator<E> iterator() {
1142 final Iterator<E> e = iterator();
1170 final Iterator<E> e = iterator();
1211 final Iterator<E> e = iterator();
1225 Iterator<?> ce = c.iterator();
[all …]
/libcore/ojluni/src/main/java/sun/net/
DProgressMonitor.java71 … for (Iterator<ProgressSource> iter = progressSourceList.iterator(); iter.hasNext();) { in getProgressSources()
121 … for (Iterator<ProgressListener> iter = progressListenerList.iterator(); iter.hasNext();) { in registerSource()
127 for (Iterator<ProgressListener> iter = listeners.iterator(); iter.hasNext();) { in registerSource()
158 … for (Iterator<ProgressListener> iter = progressListenerList.iterator(); iter.hasNext();) { in unregisterSource()
164 for (Iterator<ProgressListener> iter = listeners.iterator(); iter.hasNext();) { in unregisterSource()
190 … for (Iterator<ProgressListener> iter = progressListenerList.iterator(); iter.hasNext();) { in updateProgress()
196 for (Iterator<ProgressListener> iter = listeners.iterator(); iter.hasNext();) { in updateProgress()
/libcore/ojluni/src/main/java/java/nio/file/
DFileTreeWalker.java71 private final Iterator<Path> iterator; field in FileTreeWalker.DirectoryNode
78 this.iterator = stream.iterator(); in DirectoryNode()
93 Iterator<Path> iterator() { in iterator() method in FileTreeWalker.DirectoryNode
94 return iterator; in iterator()
346 Iterator<Path> iterator = top.iterator(); in next() local
348 if (iterator.hasNext()) { in next()
349 entry = iterator.next(); in next()

12345678910>>...14