- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 130 for getFirst (0.06 seconds)
-
guava/src/com/google/common/collect/Iterables.java
* * <p><b>Java 21+ users:</b> if {code iterable} is a {@code SequencedCollection} (e.g., any list), * consider using {@code collection.getFirst()} instead. Note that if the collection is empty, * {@code getFirst()} throws a {@code NoSuchElementException}, while this method returns the * default value. * * @param defaultValue the default value to return if the iterable is emptyCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 16:16:42 GMT 2026 - 43.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/IterablesTest.java
public void testGetFirst_withDefault_singleton() { Iterable<String> iterable = singletonList("foo"); assertThat(Iterables.getFirst(iterable, "bar")).isEqualTo("foo"); } public void testGetFirst_withDefault_empty() { Iterable<String> iterable = emptyList(); assertThat(Iterables.getFirst(iterable, "bar")).isEqualTo("bar"); } public void testGetFirst_withDefault_empty_null() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 47.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableSortedSet.java
* @since 12.0 */ @Override public @Nullable E ceiling(E e) { return Iterables.<@Nullable E>getFirst(tailSet(e, true), null); } /** * @since 12.0 */ @GwtIncompatible // NavigableSet @Override public @Nullable E higher(E e) { return Iterables.<@Nullable E>getFirst(tailSet(e, false), null); } @Override public E first() { return iterator().next(); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 36.8K bytes - Click Count (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/DocBookBuilder.java
pop(); inPara = true; } } stack.getFirst().appendChild(node); if (inPara) { Element para = document.createElement("para"); push(para); } } public void push(Element element) { stack.getFirst().appendChild(element);
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 2.8K bytes - Click Count (0) -
build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexer.java
this.visitor = visitor; } private void unwindTo(String element, TokenVisitor visitor) { if (elementStack.contains(element)) { while (!elementStack.getFirst().equals(element)) { visitor.onEndHtmlElement(elementStack.removeFirst()); } elementStack.removeFirst(); visitor.onEndHtmlElement(element); }Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Wed Dec 09 08:14:05 GMT 2020 - 5.8K bytes - Click Count (0) -
src/test/java/org/codelibs/core/collection/SLinkedListTest.java
*/ @Test public void testGetFirst() throws Exception { try { list.getFirst(); fail(); } catch (final NoSuchElementException ex) { System.out.println(ex); } list.addFirst("1"); assertThat(list.getFirst(), is("1")); } /** * @throws Exception */ @TestCreated: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Sat May 10 01:32:17 GMT 2025 - 8.3K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Synchronized.java
public @Nullable E pollLast() { synchronized (mutex) { return delegate().pollLast(); } } @Override public E getFirst() { synchronized (mutex) { return delegate().getFirst(); } } @Override public E getLast() { synchronized (mutex) { return delegate().getLast(); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Aug 08 15:11:10 GMT 2025 - 53K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/FluentIterable.java
* * @throws NullPointerException if the first element is null; if this is a possibility, use {@code * iterator().next()} or {@link Iterables#getFirst} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final Optional<@NonNull E> first() { Iterator<E> iterator = getDelegate().iterator();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Apr 02 14:49:41 GMT 2026 - 34.7K bytes - Click Count (0) -
guava/src/com/google/common/collect/FluentIterable.java
* * @throws NullPointerException if the first element is null; if this is a possibility, use {@code * iterator().next()} or {@link Iterables#getFirst} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final Optional<@NonNull E> first() { Iterator<E> iterator = getDelegate().iterator();Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Apr 02 14:49:41 GMT 2026 - 34.7K bytes - Click Count (0) -
guava/src/com/google/common/collect/Synchronized.java
public @Nullable E pollLast() { synchronized (mutex) { return delegate().pollLast(); } } @Override public E getFirst() { synchronized (mutex) { return delegate().getFirst(); } } @Override public E getLast() { synchronized (mutex) { return delegate().getLast(); } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Aug 08 15:11:10 GMT 2025 - 56.9K bytes - Click Count (0)