Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 371 for containers (0.21 sec)

  1. android/guava/src/com/google/common/collect/SingletonImmutableSet.java

      SingletonImmutableSet(E element) {
        this.element = Preconditions.checkNotNull(element);
      }
    
      @Override
      public int size() {
        return 1;
      }
    
      @Override
      public boolean contains(@CheckForNull Object target) {
        return element.equals(target);
      }
    
      @Override
      public UnmodifiableIterator<E> iterator() {
        return Iterators.singletonIterator(element);
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        }
      }
    
      /** constructor with empty array has size 0 and contains no elements */
      public void testConstructorEmptyArray() {
        AtomicDoubleArray aa = new AtomicDoubleArray(new double[0]);
        assertEquals(0, aa.length());
        assertThrows(IndexOutOfBoundsException.class, () -> aa.get(0));
      }
    
      /** constructor with length zero has size 0 and contains no elements */
      public void testConstructorZeroLength() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

    /**
     * Tester for {@code Spliterator} implementations.
     *
     * @since 21.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public final class SpliteratorTester<E extends @Nullable Object> {
      /** Return type from "contains the following elements" assertions. */
      public interface Ordered {
        /**
         * Attests that the expected values must not just be present but must be present in the order
         * they were given.
         */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 18:19:31 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/PackageSanityTests.java

        } catch (AssertionFailedError e) {
          assertWithMessage("Method did not throw null pointer OR element not in graph exception.")
              .that(e)
              .hasCauseThat()
              .hasMessageThat()
              .contains(ERROR_ELEMENT_NOT_IN_GRAPH);
        }
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 19:24:25 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.atomic.AtomicReference;
    import junit.framework.TestCase;
    
    /**
     * Supplemental tests for {@link Monitor}.
     *
     * <p>This test class contains various test cases that don't fit into the test case generation in
     * {@link GeneratedMonitorTest}.
     *
     * @author Justin T. Sampson
     */
    public class SupplementalMonitorTest extends TestCase {
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/BloomFilterTest.java

        ImmutableSet<Integer> falsePositives =
            ImmutableSet.of(
                49, 51, 59, 163, 199, 321, 325, 363, 367, 469, 545, 561, 727, 769, 773, 781);
        for (int i = 1; i < 900; i += 2) {
          if (!falsePositives.contains(i)) {
            assertFalse("BF should not contain " + i, bf.mightContain(Integer.toString(i)));
          }
        }
    
        // Check that there are exactly 29824 false positives for this BF.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveIfTester.java

          fail("removeIf(x -> true) should throw " + "UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        }
        expectUnchanged();
        assertTrue(collection.contains(samples.e0()));
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

        KeySet(ConcurrentMap<?, ?> map) {
          super(map);
        }
    
        @Override
        public Iterator<K> iterator() {
          return new KeyIterator();
        }
    
        @Override
        public boolean contains(Object o) {
          return map.containsKey(o);
        }
    
        @Override
        public boolean remove(Object o) {
          return map.remove(o) != null;
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

          for (int i = 0; i < startIndex; i++) {
            previousElements.push(nextElements.pop());
          }
        }
    
        @Override
        public void add(E e) {
          if (!features.contains(IteratorFeature.SUPPORTS_ADD)) {
            throw PermittedMetaException.UOE;
          }
    
          previousElements.push(e);
          stackWithLastReturnedElementAtTop = null;
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        try {
          new NullPointerTester().testMethodParameter(new OneArg(), method, 0);
        } catch (AssertionFailedError expected) {
          assertThat(expected.getMessage()).contains("index 0");
          assertThat(expected.getMessage()).contains("[null]");
          foundProblem = true;
        }
        assertTrue("Should report error when different exception is thrown", foundProblem);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
Back to top