Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 122 for Queue (0.18 sec)

  1. android/guava/src/com/google/common/base/FinalizablePhantomReference.java

      /**
       * Constructs a new finalizable phantom reference.
       *
       * @param referent to phantom reference
       * @param queue that should finalize the referent
       */
      protected FinalizablePhantomReference(@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.7K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/features/FeatureUtil.java

      @CanIgnoreReturnValue
      public static Set<Feature<?>> addImpliedFeatures(Set<Feature<?>> features) {
        Queue<Feature<?>> queue = new ArrayDeque<>(features);
        while (!queue.isEmpty()) {
          Feature<?> feature = queue.remove();
          for (Feature<?> implied : feature.getImpliedFeatures()) {
            if (features.add(implied)) {
              queue.add(implied);
            }
          }
        }
        return features;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 21 15:08:35 GMT 2022
    - 12.1K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/AbstractQueueTester.java

    import java.util.Queue;
    import org.junit.Ignore;
    
    /**
     * Base class for queue collection tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class AbstractQueueTester<E> extends AbstractCollectionTester<E> {
      protected final Queue<E> getQueue() {
        return (Queue<E>) collection;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 1.1K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractQueueTester.java

    import java.util.Queue;
    import org.junit.Ignore;
    
    /**
     * Base class for queue collection tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class AbstractQueueTester<E> extends AbstractCollectionTester<E> {
      protected final Queue<E> getQueue() {
        return (Queue<E>) collection;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 1.1K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

    /**
     * A bounded {@linkplain BlockingQueue blocking queue} backed by an array. This queue orders
     * elements FIFO (first-in-first-out). The head of the queue is that element that has been
     * on the queue the longest time. The tail of the queue is that element that has been on
     * the queue the shortest time. New elements are inserted at the tail of the queue, and the queue
     * retrieval operations obtain elements at the head of the queue.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/TestStringQueueGenerator.java

    import java.util.List;
    import java.util.Queue;
    
    /**
     * Create queue of strings for tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class TestStringQueueGenerator implements TestQueueGenerator<String> {
      @Override
      public SampleElements<String> samples() {
        return new Strings();
      }
    
      @Override
      public Queue<String> create(Object... elements) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Queues.java

       *
       * @param queue the queue to be wrapped in a synchronized view
       * @return a synchronized view of the specified queue
       * @since 14.0
       */
      public static <E extends @Nullable Object> Queue<E> synchronizedQueue(Queue<E> queue) {
        return Synchronized.queue(queue, null);
      }
    
      /**
       * Returns a synchronized (thread-safe) deque backed by the specified deque. In order to guarantee
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/Iterables.java

       * {@link Iterators#consumingIterator(Iterator)}.
       *
       * <p>Note: If {@code iterable} is a {@link Queue}, the returned iterable will instead use {@link
       * Queue#isEmpty} and {@link Queue#remove()}, since {@link Queue}'s iteration order is undefined.
       * Calling {@link Iterator#hasNext()} on a generated iterator from the returned iterable may cause
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        private final BlockingQueue<String> queue;
    
        public EnableWrites(BlockingQueue<String> queue, long tMinus) {
          super(tMinus);
          assertFalse(queue.isEmpty());
          assertFalse(queue.offer("shouldBeRejected"));
          this.queue = queue;
        }
    
        @Override
        protected void doAction() {
          assertNotNull(queue.remove());
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

      @Param({"100", "10000"})
      private int size;
    
      @Param private HeapType heap;
    
      private Queue<Integer> queue;
    
      private final Random random = new Random();
    
      @BeforeExperiment
      void setUp() {
        queue = heap.create(comparator.get());
        for (int i = 0; i < size; i++) {
          queue.add(random.nextInt());
        }
      }
    
      @Benchmark
      void pollAndAdd(int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top