- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 133 for getLast (0.04 sec)
-
android/guava/src/com/google/common/collect/Iterables.java
public static <T extends @Nullable Object> T getLast(Iterable<T> iterable) { // TODO(kevinb): Support a concurrently modified collection? if (iterable instanceof List) { List<T> list = (List<T>) iterable; if (list.isEmpty()) { throw new NoSuchElementException(); } return getLastInNonemptyList(list); } return Iterators.getLast(iterable.iterator()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/FluentIterable.java
* * @throws NullPointerException if the last element is null; if this is a possibility, use {@link * Iterables#getLast} instead. */ @SuppressWarnings("nullness") // Unsafe, but we can't do much about it now. public final Optional<@NonNull E> last() { // Iterables#getLast was inlined here so we don't have to throw/catch a NSEE // TODO(kevinb): Support a concurrently modified collection?
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 24 13:42:31 UTC 2024 - 35.7K bytes - Viewed (0) -
src/main/java/org/codelibs/core/collection/SLinkedList.java
throw new NoSuchElementException(); } return getFirstEntry().element; } /** * 最後の要素を返します。 * * @return 最後の要素 */ public E getLast() { if (isEmpty()) { throw new NoSuchElementException(); } return getLastEntry().element; } /** * 最初のエントリを返します。 * * @return 最初のエントリ */
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 11K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeSet.java
private final boolean positiveBoundedAbove; private final int size; ComplementRanges() { this.positiveBoundedBelow = ranges.get(0).hasLowerBound(); this.positiveBoundedAbove = Iterables.getLast(ranges).hasUpperBound(); int size = ranges.size() - 1; if (positiveBoundedBelow) { size++; } if (positiveBoundedAbove) { size++; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 27K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
* @return the last element of {@code iterator} * @since 3.0 */ @ParametricNullness public static <T extends @Nullable Object> T getLast( Iterator<? extends T> iterator, @ParametricNullness T defaultValue) { return iterator.hasNext() ? getLast(iterator) : defaultValue; } /** * Calls {@code next()} on {@code iterator}, either {@code numberToAdvance} times or until {@code
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Synchronized.java
@Override public E getFirst() { synchronized (mutex) { return delegate().getFirst(); } } @Override public E getLast() { synchronized (mutex) { return delegate().getLast(); } } @Override @CheckForNull public E peekFirst() { synchronized (mutex) { return delegate().peekFirst();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 53.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Synchronized.java
@Override public E getFirst() { synchronized (mutex) { return delegate().getFirst(); } } @Override public E getLast() { synchronized (mutex) { return delegate().getLast(); } } @Override @CheckForNull public E peekFirst() { synchronized (mutex) { return delegate().peekFirst();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 57.2K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllAtIndexTester.java
"addAll(n, allPresent) should return true", getList().addAll(0, MinimalCollection.of(e0()))); expectAdded(0, e0()); } @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testAddAllAtIndex_unsupportedAllPresent() { assertThrows( UnsupportedOperationException.class, () -> getList().addAll(0, MinimalCollection.of(e0()))); expectUnchanged(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 20:00:30 UTC 2024 - 6.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/net/HostAndPortTest.java
assertEquals("::1", HostAndPort.fromString("[::1]:80").requireBracketsForIPv6().getHost()); // Non-bracketed non-IPv6 works fine. assertEquals("x", HostAndPort.fromString("x").requireBracketsForIPv6().getHost()); assertEquals("x", HostAndPort.fromString("x:80").requireBracketsForIPv6().getHost()); // Non-bracketed IPv6 fails. assertThrows(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 9.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ListListIteratorTester.java
resetCollection(); return getList().listIterator(); } @Override protected void verify(List<E> elements) { expectContents(elements); } }.test(); } public void testListIterator_tooLow() { assertThrows(IndexOutOfBoundsException.class, () -> getList().listIterator(-1)); } public void testListIterator_tooHigh() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5K bytes - Viewed (0)