- Sort Score
- Num 10 results
- Language All
Results 511 - 520 of 578 for isEmpty (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
guava-tests/test/com/google/common/collect/QueuesTest.java
List<Object> buf = new ArrayList<>(); int elements = Queues.drain(q, buf, -1, MAX_VALUE, NANOSECONDS); assertEquals(0, elements); assertThat(buf).isEmpty(); // Free the producer thread, and give subsequent tests a clean slate. q.take(); } public void testDrain_throws() throws Exception { for (BlockingQueue<Object> q : blockingQueues()) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Nov 04 17:24:58 GMT 2025 - 12.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
} void checkEmpty(BlockingQueue<?> q) { try { assertTrue(q.isEmpty()); assertEquals(0, q.size()); assertThat(q.peek()).isNull(); assertThat(q.poll()).isNull(); assertThat(q.poll(0, MILLISECONDS)).isNull(); assertEquals("[]", q.toString()); assertThat(q.toArray()).isEmpty(); assertFalse(q.iterator().hasNext()); try { q.element();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:07:52 GMT 2025 - 37.8K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableSortedMap.java
return keyOrNull(higherEntry(key)); } @Override public @Nullable Entry<K, V> firstEntry() { return isEmpty() ? null : entrySet().asList().get(0); } @Override public @Nullable Entry<K, V> lastEntry() { return isEmpty() ? null : entrySet().asList().get(size() - 1); } /** * Guaranteed to throw an exception and leave the map unmodified. *
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 52.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java
} }, ArrayTableImpl { @Override <R extends Comparable<R>, C extends Comparable<C>, V> Table<R, C, V> create( Table<R, C, V> contents) { if (contents.isEmpty()) { return ImmutableTable.of(); } else { return ArrayTable.create(contents); } } }, ImmutableTableImpl { @OverrideCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 12.5K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Jul 16 17:42:14 GMT 2025 - 15.8K bytes - Click Count (0) -
android/guava/src/com/google/common/io/Closer.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 10.3K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
* {@snippet : * final WeakHashMap<Object, Object> map = new WeakHashMap<>(); * map.put(new Object(), Boolean.TRUE); * GcFinalization.awaitDone(new FinalizationPredicate() { * public boolean isDone() { * return map.isEmpty(); * } * }); * } * * <p>Even if your non-test code does not use finalization, you can use this class to test for * leaks, by ensuring that objects are no longer strongly referenced: * * {@snippet :Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 11.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/TreeMultisetTest.java
assertThat(subset).containsExactly("b", "c", "d", "e").inOrder(); subset.clear(); assertThat(elementSet).containsExactly("a", "f").inOrder(); assertThat(subset).isEmpty(); assertEquals(3, ms.size()); } public void testCustomComparator() throws Exception { Comparator<String> comparator = new Comparator<String>() { @Override
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 13K bytes - Click Count (0) -
guava/src/com/google/common/collect/CompactHashMap.java
} } else { keys[dstIndex] = null; values[dstIndex] = null; entries[dstIndex] = 0; } } int firstEntryIndex() { return isEmpty() ? -1 : 0; } int getSuccessor(int entryIndex) { return (entryIndex + 1 < size) ? entryIndex + 1 : -1; } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jul 08 18:32:10 GMT 2025 - 39.6K bytes - Click Count (0) -
guava/src/com/google/common/collect/FluentIterable.java
// TODO(kevinb): Support a concurrently modified collection? Iterable<E> iterable = getDelegate(); if (iterable instanceof List) { List<E> list = (List<E>) iterable; if (list.isEmpty()) { return Optional.absent(); } return Optional.of(list.get(list.size() - 1)); } Iterator<E> iterator = iterable.iterator(); if (!iterator.hasNext()) {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 18:35:44 GMT 2025 - 34.7K bytes - Click Count (0)