Home
last modified time | relevance | path

Searched refs:first (Results 1 – 25 of 80) sorted by relevance

1234

/libcore/ojluni/src/main/java/sun/misc/
DCleaner.java72 static private Cleaner first = null; field in Cleaner
79 if (first != null) { in add()
80 cl.next = first; in add()
81 first.prev = cl; in add()
83 first = cl; in add()
94 if (first == cl) { in remove()
96 first = cl.next; in remove()
98 first = cl.prev; in remove()
/libcore/luni/src/main/java/java/util/concurrent/
DDelayQueue.java164 E first = q.peek(); in poll() local
165 return (first == null || first.getDelay(NANOSECONDS) > 0) in poll()
185 E first = q.peek(); in take() local
186 if (first == null) in take()
189 long delay = first.getDelay(NANOSECONDS); in take()
192 first = null; // don't retain ref while waiting in take()
230 E first = q.peek(); in poll() local
231 if (first == null) { in poll()
237 long delay = first.getDelay(NANOSECONDS); in poll()
242 first = null; // don't retain ref while waiting in poll()
[all …]
DScheduledThreadPoolExecutor.java1075 RunnableScheduledFuture<?> first = queue[0]; in poll() local
1076 return (first == null || first.getDelay(NANOSECONDS) > 0) in poll()
1078 : finishPoll(first); in poll()
1089 RunnableScheduledFuture<?> first = queue[0]; in take() local
1090 if (first == null) in take()
1093 long delay = first.getDelay(NANOSECONDS); in take()
1095 return finishPoll(first); in take()
1096 first = null; // don't retain ref while waiting in take()
1125 RunnableScheduledFuture<?> first = queue[0]; in poll() local
1126 if (first == null) { in poll()
[all …]
DLinkedBlockingDeque.java113 transient Node<E> first; field in LinkedBlockingDeque
192 Node<E> f = first; in linkFirst()
194 first = node; in linkFirst()
214 if (first == null) in linkLast()
215 first = node; in linkLast()
228 Node<E> f = first; in unlinkFirst()
235 first = n; in unlinkFirst()
259 first = null; in unlinkLast()
541 return (first == null) ? null : first.item; in peekFirst()
562 for (Node<E> p = first; p != null; p = p.next) { in removeFirstOccurrence()
[all …]
DConcurrentLinkedDeque.java499 private void unlinkFirst(Node<E> first, Node<E> next) { in unlinkFirst() argument
505 if (o != null && p.prev != p && first.casNext(next, p)) { in unlinkFirst()
507 if (first.prev == null && in unlinkFirst()
509 p.prev == first) { in unlinkFirst()
694 return (p == q) ? first() : q; in succ()
713 Node<E> first() { in first() method in ConcurrentLinkedDeque
874 for (Node<E> p = first(); p != null; p = succ(p)) { in peekFirst()
906 for (Node<E> p = first(); p != null; p = succ(p)) { in pollFirst()
1003 for (Node<E> p = first(); p != null; p = succ(p)) { in removeFirstOccurrence()
1047 for (Node<E> p = first(); p != null; p = succ(p)) { in contains()
[all …]
DConcurrentLinkedQueue.java360 Node<E> first() { in first() method in ConcurrentLinkedQueue
383 return first() == null; in isEmpty()
405 for (Node<E> p = first(); p != null;) { in size()
426 for (Node<E> p = first(); p != null; p = succ(p)) { in contains()
449 for (Node<E> p = first(); p != null; pred = p, p = next) { in remove()
537 for (Node<E> p = first(); p != null;) { in toString()
563 for (Node<E> p = first(); p != null;) { in toArrayInternal()
746 for (Node<E> p = first(); p != null; p = succ(p)) { in writeObject()
802 ((p = current) != null || (p = q.first()) != null) && in trySplit()
810 p = q.first(); in trySplit()
[all …]
/libcore/ojluni/src/main/java/java/util/jar/
DJarInputStream.java48 private JarEntry first; field in JarInputStream
86 first = checkManifest(e); in JarInputStream()
141 if (first == null) { in getNextEntry()
148 e = first; in getNextEntry()
149 if (first.getName().equalsIgnoreCase(JarIndex.INDEX_NAME)) in getNextEntry()
151 first = null; in getNextEntry()
206 if (first == null) { in read()
/libcore/ojluni/src/main/java/java/util/stream/
DStreams.java334 T first; field in Streams.StreamBuilderImpl
351 first = t; in StreamBuilderImpl()
360 first = t; in accept()
366 buffer.accept(first); in accept()
405 action.accept(first); in tryAdvance()
419 action.accept(first); in forEachRemaining()
430 int first; field in Streams.IntStreamBuilderImpl
447 first = t; in IntStreamBuilderImpl()
456 first = t; in accept()
462 buffer.accept(first); in accept()
[all …]
/libcore/ojluni/src/main/java/java/util/
DLinkedList.java94 transient Node<E> first; field in LinkedList
126 final Node<E> f = first; in linkFirst()
128 first = newNode; in linkFirst()
145 first = newNode; in linkLast()
161 first = newNode; in linkBefore()
177 first = next; in unlinkFirst()
198 first = null; in unlinkLast()
216 first = next; in unlink()
242 final Node<E> f = first; in getFirst()
268 final Node<E> f = first; in removeFirst()
[all …]
DArrayPrefixHelpers.java170 int first; in compute() local
173 first = org + 1; in compute()
177 first = l; in compute()
179 for (int i = first; i < h; ++i) // cumulate in compute()
322 int first; in compute() local
325 first = org + 1; in compute()
329 first = l; in compute()
331 for (int i = first; i < h; ++i) // cumulate in compute()
472 int first; in compute() local
475 first = org + 1; in compute()
[all …]
DEnumSet.java167 E first = i.next(); in copyOf() local
168 EnumSet<E> result = EnumSet.of(first); in copyOf()
320 public static <E extends Enum<E>> EnumSet<E> of(E first, E... rest) { in of() argument
321 EnumSet<E> result = noneOf(first.getDeclaringClass()); in of()
322 result.add(first); in of()
/libcore/luni/src/test/java/libcore/util/
DZoneInfoDBTest.java84 ZoneInfo first = data.makeTimeZone(tzId); in testMakeTimeZone_timeZoneMutability() local
86 assertNotSame(first, second); in testMakeTimeZone_timeZoneMutability()
88 assertTrue(first.hasSameRules(second)); in testMakeTimeZone_timeZoneMutability()
90 first.setID("Not Europe/London"); in testMakeTimeZone_timeZoneMutability()
92 assertFalse(first.getID().equals(second.getID())); in testMakeTimeZone_timeZoneMutability()
94 first.setRawOffset(3600); in testMakeTimeZone_timeZoneMutability()
95 assertFalse(first.getRawOffset() == second.getRawOffset()); in testMakeTimeZone_timeZoneMutability()
/libcore/ojluni/src/main/java/sun/security/util/
DObjectIdentifier.java150 int first = 0, second; in ObjectIdentifier() local
170 first = bignum.intValue(); in ObjectIdentifier()
173 checkSecondComponent(first, bignum); in ObjectIdentifier()
174 bignum = bignum.add(BigInteger.valueOf(40*first)); in ObjectIdentifier()
184 first = num; in ObjectIdentifier()
187 checkSecondComponent(first, num); in ObjectIdentifier()
188 num += 40 * first; in ObjectIdentifier()
623 private static void checkFirstComponent(int first) throws IOException { in checkFirstComponent() argument
624 if (first < 0 || first > 2) { in checkFirstComponent()
629 private static void checkFirstComponent(BigInteger first) throws IOException { in checkFirstComponent() argument
[all …]
/libcore/support/src/test/java/tests/util/
DPair.java31 private Pair(F first, S second) { in Pair() argument
32 mFirst = first; in Pair()
42 public static <F, S> Pair<F, S> of(F first, S second) { in of() argument
43 return new Pair<F, S>(first, second); in of()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileWriterTest.java62 String first = "The first string for testing. "; in test_ConstructorLjava_io_FileZ() local
63 fileWriter.write(first); in test_ConstructorLjava_io_FileZ()
72 char[] out = new char[first.length() + second.length() + 10]; in test_ConstructorLjava_io_FileZ()
75 assertEquals(first + second, new String(out, 0, length)); in test_ConstructorLjava_io_FileZ()
78 first = "The first string for testing. "; in test_ConstructorLjava_io_FileZ()
79 fileWriter.write(first); in test_ConstructorLjava_io_FileZ()
88 out = new char[first.length() + second.length() + 10]; in test_ConstructorLjava_io_FileZ()
/libcore/luni/src/main/java/libcore/icu/
DICU.java79 final int first = string.indexOf('_'); in parseLangScriptRegionAndVariants() local
80 final int second = string.indexOf('_', first + 1); in parseLangScriptRegionAndVariants()
83 if (first == -1) { in parseLangScriptRegionAndVariants()
90 outputArray[IDX_LANGUAGE] = string.substring(0, first); in parseLangScriptRegionAndVariants()
91 final String secondString = string.substring(first + 1); in parseLangScriptRegionAndVariants()
111 outputArray[IDX_LANGUAGE] = string.substring(0, first); in parseLangScriptRegionAndVariants()
112 final String secondString = string.substring(first + 1, second); in parseLangScriptRegionAndVariants()
134 outputArray[IDX_VARIANT] = string.substring(first + 1); in parseLangScriptRegionAndVariants()
141 outputArray[IDX_LANGUAGE] = string.substring(0, first); in parseLangScriptRegionAndVariants()
142 final String secondString = string.substring(first + 1, second); in parseLangScriptRegionAndVariants()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DAbstractQueuedLongSynchronizer.java1397 private void doSignal(Node first) { in doSignal() argument
1399 if ( (firstWaiter = first.nextWaiter) == null) in doSignal()
1401 first.nextWaiter = null; in doSignal()
1402 } while (!transferForSignal(first) && in doSignal()
1403 (first = firstWaiter) != null); in doSignal()
1410 private void doSignalAll(Node first) { in doSignalAll() argument
1413 Node next = first.nextWaiter; in doSignalAll()
1414 first.nextWaiter = null; in doSignalAll()
1415 transferForSignal(first); in doSignalAll()
1416 first = next; in doSignalAll()
[all …]
DAbstractQueuedSynchronizer.java1866 private void doSignal(Node first) { in doSignal() argument
1868 if ( (firstWaiter = first.nextWaiter) == null) in doSignal()
1870 first.nextWaiter = null; in doSignal()
1871 } while (!transferForSignal(first) && in doSignal()
1872 (first = firstWaiter) != null); in doSignal()
1879 private void doSignalAll(Node first) { in doSignalAll() argument
1882 Node next = first.nextWaiter; in doSignalAll()
1883 first.nextWaiter = null; in doSignalAll()
1884 transferForSignal(first); in doSignalAll()
1885 first = next; in doSignalAll()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DAttributedCharacterIteratorTest.java53 assertEquals("Wrong first1", 'T', it.first()); in test_first()
55 assertEquals("Wrong first2", 'T', it.first()); in test_first()
57 assertEquals("Wrong first3", 's', it.first()); in test_first()
59 assertTrue("Wrong first4", it.first() == CharacterIterator.DONE); in test_first()
DBreakIteratorTest.java75 assertEquals(iterator.first(), iterator.current()); in testCurrent()
79 assertEquals(0, iterator.first()); in testFirst()
81 assertEquals(0, iterator.first()); in testFirst()
273 int n = bi.first(); in test_next()
/libcore/luni/src/test/java/libcore/java/util/
DTimSortTest.java30 public int compare(Integer first, Integer second) {
31 return first.compareTo(second);
/libcore/ojluni/src/main/java/java/text/
DIcuIteratorWrapper.java271 public int first() { in first() method in IcuIteratorWrapper
272 return wrapped.first(); in first()
DCharacterIterator.java121 public char first(); in first() method
/libcore/ojluni/src/main/java/sun/security/x509/
DExtendedKeyUsageExtension.java206 boolean first = true; in toString()
208 if(!first) { in toString()
218 first = false; in toString()
/libcore/luni/src/test/java/libcore/java/sql/
DOldResultSetTest.java193 assertFalse(emptyTarget.first()); in testtestFirst()
194 assertTrue(target.first()); in testtestFirst()
199 target.first(); in testtestFirst()
243 target.first(); in testtestIsFirst()
325 target.first(); in testPrevious()

1234