Searched refs:first (Results 1 - 25 of 59) sorted by relevance

123

/libcore/luni/src/main/java/java/text/
H A DCharacterIterator.java56 public char first(); method in interface:CharacterIterator
61 * @return the index of the first character of the iteration.
H A DIcuIteratorWrapper.java40 @Override public int first() { method in class:IcuIteratorWrapper
41 return wrapped.first();
H A DBreakIterator.java56 * {@code first()}, {@code last()}, {@code next()}, and {@code previous()} that
71 * follow them. Thus, under normal circumstances, the position before the first
72 * character is 0, the position after the first character is 1, and the position
122 * int start = boundary.first();
146 * Print the first element:
151 * int start = boundary.first();
371 * Sets this iterator's current position to the first boundary and returns
374 * @return the position of the first boundary.
376 public abstract int first(); method in class:BreakIterator
379 * Sets the position of the first boundar
[all...]
/libcore/luni/src/main/java/java/util/
H A DSortedSet.java41 * Returns the first element in this {@code SortedSet}. The first element
44 * @return the first element.
48 public E first(); method in interface:SortedSet
H A DLinkedList.java523 * Returns the first element in this {@code LinkedList}.
525 * @return the first element.
534 Link<E> first = voidLink.next;
535 if (first != voidLink) {
536 return first.data;
669 * Removes the first object from this {@code LinkedList}.
680 Link<E> first = voidLink.next;
681 if (first != voidLink) {
682 Link<E> next = first.next;
687 return first
[all...]
/libcore/support/src/test/java/tests/util/
H A DPair.java24 * @param <F> type of the first value.
31 private Pair(F first, S second) { argument
32 mFirst = first;
39 * @param first first value or {@code null}.
42 public static <F, S> Pair<F, S> of(F first, S second) { argument
43 return new Pair<F, S>(first, second);
47 * Gets the first value from this pair.
/libcore/luni/src/main/java/java/util/concurrent/
H A DDelayQueue.java159 E first = q.peek();
160 if (first == null || first.getDelay(NANOSECONDS) > 0)
181 E first = q.peek();
182 if (first == null)
185 long delay = first.getDelay(NANOSECONDS);
188 first = null; // don't retain ref while waiting
226 E first = q.peek();
227 if (first == null) {
233 long delay = first
[all...]
H A DScheduledThreadPoolExecutor.java31 * execution time are enabled in first-in-first-out (FIFO) order of
1043 * first element with last and sifts it down. Call only when
1061 RunnableScheduledFuture<?> first = queue[0];
1062 if (first == null || first.getDelay(NANOSECONDS) > 0)
1065 return finishPoll(first);
1076 RunnableScheduledFuture<?> first = queue[0];
1077 if (first == null)
1080 long delay = first
[all...]
H A DLinkedBlockingDeque.java64 * self-link implicitly means to jump to "first" (for next links)
106 * Pointer to first node.
107 * Invariant: (first == null && last == null) ||
108 * (first.prev == null && first.item != null)
110 transient Node<E> first; field in class:LinkedBlockingDeque
114 * Invariant: (first == null && last == null) ||
183 * Links node as first element, or returns false if full.
189 Node<E> f = first;
191 first
[all...]
H A DConcurrentLinkedQueue.java22 * This queue orders elements FIFO (first-in-first-out).
122 * to be two or more steps away from the first/last node.
193 * A node from which the first live (non-deleted) node (if any)
367 * Returns the first live (non-deleted) node on list, or null if none.
369 * first node, not element. We could make peek() a wrapper around
370 * first(), but that would cost an extra volatile read of item,
374 Node<E> first() { method in class:ConcurrentLinkedQueue
397 return first() == null;
418 for (Node<E> p = first();
[all...]
H A DLinkedBlockingQueue.java24 * This queue orders elements FIFO (first-in-first-out).
71 * this gives visibility to the first n items.
181 Node<E> first = h.next;
183 head = first;
184 E x = first.item;
185 first.item = null;
478 Node<E> first = head.next;
479 if (first == null)
482 return first
[all...]
H A DConcurrentLinkedDeque.java93 * At any time, there is precisely one "first" node with a null
97 * a live node. The "first" and "last" nodes may or may not be live.
98 * The "first" and "last" nodes are always mutually reachable.
101 * next reference in the first or last node to a fresh node
106 * first or last node. Active nodes cannot be unlinked.
120 * The head and tail are only approximations to the first and last
121 * nodes of the deque. The first node can always be found by
142 * links from the first node is equal to the elements found via
150 * structure "gc-robust", as first described in detail by Boehm
189 * goto the first nod
503 unlinkFirst(Node<E> first, Node<E> next) argument
717 Node<E> first() { method in class:ConcurrentLinkedDeque
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DFileWriterTest.java62 String first = "The first string for testing. ";
63 fileWriter.write(first);
72 char[] out = new char[first.length() + second.length() + 10];
75 assertEquals(first + second, new String(out, 0, length));
78 first = "The first string for testing. ";
79 fileWriter.write(first);
88 out = new char[first.length() + second.length() + 10];
/libcore/luni/src/test/java/libcore/util/
H A DZoneInfoDBTest.java84 ZoneInfo first = data.makeTimeZone(tzId);
86 assertNotSame(first, second);
88 assertTrue(first.hasSameRules(second));
90 first.setID("Not Europe/London");
92 assertFalse(first.getID().equals(second.getID()));
94 first.setRawOffset(3600);
95 assertFalse(first.getRawOffset() == second.getRawOffset());
/libcore/luni/src/test/java/libcore/java/util/
H A DTimSortTest.java30 public int compare(Integer first, Integer second) {
31 return first.compareTo(second);
/libcore/luni/src/main/java/libcore/icu/
H A DICU.java78 final int first = string.indexOf('_');
79 final int second = string.indexOf('_', first + 1);
82 if (first == -1) {
89 outputArray[IDX_LANGUAGE] = string.substring(0, first);
90 final String secondString = string.substring(first + 1);
110 outputArray[IDX_LANGUAGE] = string.substring(0, first);
111 final String secondString = string.substring(first + 1, second);
133 outputArray[IDX_VARIANT] = string.substring(first + 1);
140 outputArray[IDX_LANGUAGE] = string.substring(0, first);
141 final String secondString = string.substring(first
[all...]
/libcore/libart/src/main/java/java/lang/
H A DClassLoader.java74 * creation of the system class loader until first use. We use a static
390 * implementation first tries to use the parent class loader to find the
410 * This implementation first uses this class loader's parent to find the
424 Enumeration<URL> first = parent.getResources(resName);
427 return new TwoEnumerationsInOne(first, second);
728 * first enumeration until it's empty, then from the second one.
732 private final Enumeration<URL> first; field in class:TwoEnumerationsInOne
736 public TwoEnumerationsInOne(Enumeration<URL> first, Enumeration<URL> second) { argument
737 this.first = first;
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DAttributedCharacterIteratorTest.java33 assertEquals("Wrong first", 'T', it.current());
47 * @tests java.text.AttributedCharacterIterator#first()
53 assertEquals("Wrong first1", 'T', it.first());
55 assertEquals("Wrong first2", 'T', it.first());
57 assertEquals("Wrong first3", 's', it.first());
59 assertTrue("Wrong first4", it.first() == CharacterIterator.DONE);
89 assertEquals("Wrong first", 0, it.getIndex());
122 assertEquals("Wrong first", 'e', it.next());
140 assertEquals("Wrong first", 'g', it.previous());
151 assertEquals("Wrong first", '
[all...]
H A DAttributedStringTest.java37 buf.append(it.first());
114 public char first() { method in class:AttributedStringTest.testAttributedCharacterIterator
H A DBreakIteratorTest.java75 assertEquals(iterator.first(), iterator.current());
79 assertEquals(0, iterator.first());
81 assertEquals(0, iterator.first());
273 int n = bi.first();
H A DStringCharacterIteratorTest.java176 * @tests java.text.StringCharacterIterator.first()
180 assertEquals('f', fixture.first());
182 assertEquals('f', fixture.first());
184 assertEquals('f', fixture.first());
187 assertEquals('i', fixture.first());
191 assertEquals("Wrong first char", 's', it1.first());
194 assertTrue("Not DONE", it1.first() == CharacterIterator.DONE);
/libcore/luni/src/main/java/java/io/
H A DPipedReader.java242 boolean first = true;
248 if (!first && lastWriter != null && !lastWriter.isAlive()) {
251 first = false;
261 /* Copy chars from out to end of buffer first */
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DAbstractQueuedLongSynchronizer.java65 * first in the queue. But being first does not guarantee success;
114 * is constructed and head and tail pointers are set upon first
154 * first indicate they need a signal,
953 * Implemented by first checking interrupt status, then invoking
975 * and failing if the given timeout elapses. Implemented by first
1020 * first invoking at least once {@link #tryAcquireShared},
1036 * by first checking interrupt status, then invoking at least once
1057 * failing if the given timeout elapses. Implemented by first
1127 * Returns the first (longes
1620 doSignal(Node first) argument
1633 doSignalAll(Node first) argument
[all...]
H A DAbstractQueuedSynchronizer.java22 * first-in-first-out (FIFO) wait queues. This class is designed to
122 * <em>unblock the first queued thread</em>;
291 * first in the queue. But being first does not guarantee success;
340 * is constructed and head and tail pointers are set upon first
380 * first indicate they need a signal,
1179 * Implemented by first checking interrupt status, then invoking
1201 * and failing if the given timeout elapses. Implemented by first
1246 * first invokin
1844 doSignal(Node first) argument
1857 doSignalAll(Node first) argument
[all...]
/libcore/luni/src/test/java/libcore/java/sql/
H A DOldResultSetTest.java193 assertFalse(emptyTarget.first());
194 assertTrue(target.first());
199 target.first();
243 target.first();
260 * Second block first assertion fails. Is Last should evaluate true if the
303 //before first - first
305 //first - second
325 target.first();

Completed in 509 milliseconds

123