Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for MinimalCollection (0.32 sec)

  1. guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

    @ElementTypesAreNonnullByDefault
    public class MinimalCollection<E extends @Nullable Object> extends AbstractCollection<E> {
      // TODO: expose allow nulls parameter?
    
      public static <E extends @Nullable Object> MinimalCollection<E> of(E... contents) {
        return new MinimalCollection<>(Object.class, true, contents);
      }
    
      // TODO: use this
      public static <E extends @Nullable Object> MinimalCollection<E> ofClassAndContents(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

    @ElementTypesAreNonnullByDefault
    public class MinimalCollection<E extends @Nullable Object> extends AbstractCollection<E> {
      // TODO: expose allow nulls parameter?
    
      public static <E extends @Nullable Object> MinimalCollection<E> of(E... contents) {
        return new MinimalCollection<>(Object.class, true, contents);
      }
    
      // TODO: use this
      public static <E extends @Nullable Object> MinimalCollection<E> ofClassAndContents(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/SetAddAllTester.java

        assertTrue(
            "add(somePresent) should return true", getSet().addAll(MinimalCollection.of(e3(), e0())));
        expectAdded(e3());
      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testAddAll_withDuplicates() {
        MinimalCollection<E> elementsToAdd = MinimalCollection.of(e3(), e4(), e3(), e4());
        assertTrue("add(hasDuplicates) should return true", getSet().addAll(elementsToAdd));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/TestsForQueuesInJavaUtil.java

        return QueueTestSuiteBuilder.using(
                new TestStringQueueGenerator() {
                  @Override
                  public Queue<String> create(String[] elements) {
                    return new ArrayDeque<>(MinimalCollection.of(elements));
                  }
                })
            .named("ArrayDeque")
            .withFeatures(
                CollectionFeature.GENERAL_PURPOSE, CollectionFeature.KNOWN_ORDER, CollectionSize.ANY)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 7.7K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/collect/testing/MinimalCollectionTest.java

                    // TODO: MinimalCollection should perhaps throw
                    for (Object element : elements) {
                      if (element == null) {
                        throw new NullPointerException();
                      }
                    }
                    return MinimalCollection.of(elements);
                  }
                })
            .named("MinimalCollection")
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/collect/testing/MinimalCollectionTest.java

                    // TODO: MinimalCollection should perhaps throw
                    for (Object element : elements) {
                      if (element == null) {
                        throw new NullPointerException();
                      }
                    }
                    return MinimalCollection.of(elements);
                  }
                })
            .named("MinimalCollection")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.7K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

      }
    
      public void testContainsAll_disjoint() {
        assertFalse(
            "containsAll(disjoint) should return false",
            collection.containsAll(MinimalCollection.of(e3())));
      }
    
      @CollectionFeature.Require(absent = ALLOWS_NULL_QUERIES)
      public void testContainsAll_nullNotAllowed() {
        try {
          assertFalse(collection.containsAll(MinimalCollection.of((E) null)));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveAllTester.java

            "removeAll(emptyCollection) should return false",
            collection.removeAll(MinimalCollection.of()));
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemoveAll_nonePresent() {
        assertFalse(
            "removeAll(disjointCollection) should return false",
            collection.removeAll(MinimalCollection.of(e3())));
        expectUnchanged();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableListTest.java

        // "<String>" is required to work around a javac 1.5 bug.
        Collection<String> c = MinimalCollection.<String>of();
        List<String> list = ImmutableList.copyOf(c);
        assertEquals(Collections.emptyList(), list);
      }
    
      public void testCopyOf_collection_oneElement() {
        Collection<String> c = MinimalCollection.of("a");
        List<String> list = ImmutableList.copyOf(c);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 23.3K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAllTester.java

        assertTrue(
            "addAll(allPresent) should return true", getList().addAll(MinimalCollection.of(e0())));
        expectAdded(e0());
      }
    
      @CollectionFeature.Require(absent = SUPPORTS_ADD)
      @CollectionSize.Require(absent = ZERO)
      public void testAddAll_unsupportedAllPresent() {
        try {
          getList().addAll(MinimalCollection.of(e0()));
          fail("addAll(allPresent) should throw");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.4K bytes
    - Viewed (0)
Back to top