- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 70 for queue (0.26 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
ListenerCallQueue<Object> queue = new ListenerCallQueue<>(); queue.addListener(listener, directExecutor()); Multiset<Object> counters = ConcurrentHashMultiset.create(); queue.enqueue(incrementingEvent(counters, listener, 1)); queue.enqueue(THROWING_EVENT); queue.enqueue(incrementingEvent(counters, listener, 2)); queue.enqueue(THROWING_EVENT); queue.enqueue(incrementingEvent(counters, listener, 3));
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java
import java.util.Collection; import java.util.Iterator; import java.util.Queue; import junit.framework.TestCase; import org.checkerframework.checker.nullness.qual.Nullable; /** * Tests for {@link Synchronized#queue} and {@link Queues#synchronizedQueue}. * * @author Kurt Alfred Kluever */ public class SynchronizedQueueTest extends TestCase { protected Queue<String> create() { TestQueue<String> inner = new TestQueue<>();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Apr 19 19:24:36 GMT 2023 - 4.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/TestsForQueuesInJavaUtil.java
return QueueTestSuiteBuilder.using( new TestStringQueueGenerator() { @Override public Queue<String> create(String[] elements) { Queue<String> queue = new LinkedList<>(MinimalCollection.of(elements)); return Collections.checkedQueue(queue, String.class); } }) .named("checkedQueue/LinkedList") .withFeatures(
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 9.4K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java
queue = (BlockingQueue<String>) constructor.newInstance(capacity); strings = new String[capacity]; for (int i = 0; i < capacity; i++) { strings[i] = String.valueOf(Math.random()); } } @Benchmark void addsAndRemoves(int reps) { int capacity = this.capacity; BlockingQueue<String> queue = this.queue; String[] strings = this.strings;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2K bytes - Viewed (0) -
android/guava/src/com/google/common/base/FinalizableWeakReference.java
/** * Constructs a new finalizable weak reference. * * @param referent to weakly reference * @param queue that should finalize the referent */ protected FinalizableWeakReference(@CheckForNull T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 23 15:09:35 GMT 2023 - 1.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingQueue.java
import java.util.NoSuchElementException; import java.util.Queue; import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; /** * A queue which forwards all its method calls to another queue. Subclasses should override one or * more methods to modify the behavior of the backing queue as desired per the <a
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Jun 29 19:42:21 GMT 2021 - 4.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/TestQueueGenerator.java
import java.util.Queue; import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates queues, containing sample elements, to be tested. * * @author Jared Levy */ @GwtCompatible @ElementTypesAreNonnullByDefault public interface TestQueueGenerator<E extends @Nullable Object> extends TestCollectionGenerator<E> { @Override Queue<E> create(Object... elements);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 21 16:49:06 GMT 2024 - 1.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/EvictingQueue.java
import java.util.Collection; import java.util.Queue; /** * A non-blocking queue which automatically evicts elements from the head of the queue when * attempting to add new elements onto the queue and it is full. This queue orders elements FIFO * (first-in-first-out). This data structure is logically equivalent to a circular buffer (i.e., * cyclic buffer or ring buffer). *
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri May 12 17:52:55 GMT 2023 - 4.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConsumingQueueIterator.java
private final Queue<T> queue; ConsumingQueueIterator(Queue<T> queue) { this.queue = checkNotNull(queue); } @Override @CheckForNull protected T computeNext() { // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (queue.isEmpty()) { return endOfData(); } return queue.remove(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Sat Jan 21 14:48:03 GMT 2023 - 1.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java
new ForwardingWrapperTester() .testForwarding( Queue.class, new Function<Queue, Queue>() { @Override public Queue apply(Queue delegate) { return wrap(delegate); } }); } private static <T> Queue<T> wrap(final Queue<T> delegate) { return new ForwardingQueue<T>() { @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 19 19:24:36 GMT 2023 - 4.2K bytes - Viewed (0)