Home
last modified time | relevance | path

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

12345678910>>...16

/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/
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 …]
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.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()
/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()
62 Iterator<ServiceLoaderTestInterface> it = loader.iterator(); in testLoadInstalled()
71 ServiceLoader.load(ServiceLoaderTestInterfaceMissingClass.class).iterator().next(); in test_missingRegisteredClass()
82 ServiceLoader.load(ServiceLoaderTestInterfaceWrongType.class).iterator().next(); in test_wrongTypeRegisteredClass()
92 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 …]
/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/test/java/util/EnumSet/
DSmallEnumIteratorRemoveResilience.java54 final Iterator<SmallEnum> iterator = set.iterator(); in testSmallEnumRemoveResilience() local
57 SmallEnum element = iterator.next(); in testSmallEnumRemoveResilience()
59 iterator.remove(); in testSmallEnumRemoveResilience()
63 element = iterator.next(); in testSmallEnumRemoveResilience()
76 iterator.remove(); in testSmallEnumRemoveResilience()
DLargeEnumIteratorRemoveResilience.java66 final Iterator<LargeEnum> iterator = set.iterator(); in testLargeEnumIterator() local
69 LargeEnum element = iterator.next(); in testLargeEnumIterator()
71 iterator.remove(); in testLargeEnumIterator()
75 element = iterator.next(); in testLargeEnumIterator()
88 iterator.remove(); in testLargeEnumIterator()
/libcore/ojluni/src/test/java/lang/String/
DLines.java79 Iterator<String> iterator = lines.iterator(); in testString() local
80 Iterator<String> brIterator = brLines.iterator(); in testString()
83 while (iterator.hasNext() && brIterator.hasNext()) { in testString()
85 String line = iterator.next(); in testString()
94 if (iterator.hasNext() || brIterator.hasNext()) { in testString()
/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/
DAbstractCollection.java78 public abstract Iterator<E> iterator(); in iterator() method in AbstractCollection
103 Iterator<E> it = iterator(); in contains()
142 Iterator<E> it = iterator(); in toArray()
186 Iterator<E> it = iterator(); in toArray()
272 Iterator<E> it = iterator(); in remove()
366 Iterator<?> it = iterator(); in removeAll()
401 Iterator<E> it = iterator(); in retainAll()
428 Iterator<E> it = iterator(); in clear()
449 Iterator<E> it = iterator(); in toString()
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 …]
/libcore/ojluni/src/test/java/util/Collection/testlibrary/
DCollectionAsserts.java49 assertCountSum(it.iterator(), count, sum); in assertCountSum()
99 assertSorted(iter.iterator()); in assertSorted()
103 assertSorted(iter.iterator(), comp); in assertSorted()
107 assertUnique(iter.iterator()); in assertUnique()
128 assertContents(actual.iterator(), expected.iterator(), msg); in assertContents()
166 assertContents(actual, Arrays.asList(expected).iterator()); in assertContents()
187 Iterator<Iterable<T>> mI = splits.iterator(); in assertSplitContents()
189 Iterator<T> lI = list.iterator(); in assertSplitContents()
193 pI = mI.next().iterator(); in assertSplitContents()
199 pI = mI.next().iterator(); in assertSplitContents()
[all …]
/libcore/ojluni/src/main/java/java/text/
DAttributedString.java95 AttributedCharacterIterator iterator = iterators[counter]; in AttributedString() local
96 int start = iterator.getBeginIndex(); in AttributedString()
97 int end = iterator.getEndIndex(); in AttributedString()
101 iterator.setIndex(index); in AttributedString()
103 Map<Attribute,Object> attrs = iterator.getAttributes(); in AttributedString()
109 index = iterator.getRunLimit(); in AttributedString()
161 … Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator = attributes.entrySet().iterator(); in AttributedString() local
162 while (iterator.hasNext()) { in AttributedString()
163 Map.Entry<? extends Attribute, ?> entry = iterator.next(); in AttributedString()
267 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/test/java/util/Map/
DEntrySetIterator.java42 Iterator<Map.Entry<String, String>> iterator = entrySet.iterator(); in testEntrySetIterator() local
44 assertTrue(iterator.hasNext()); in testEntrySetIterator()
51 assertTrue(iterator.hasNext()); in testEntrySetIterator()
/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 …]

12345678910>>...16