Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 819 for nulls (0.04 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java

        assertTrue("add(null) should return true", collection.add(null));
        expectAdded((E) null);
      }
    
      @CollectionFeature.Require(value = SUPPORTS_ADD, absent = ALLOWS_NULL_VALUES)
      public void testAdd_nullUnsupported() {
        assertThrows(NullPointerException.class, () -> collection.add(null));
        expectUnchanged();
        expectNullMissingWhenNullUnsupported("Should not contain null after unsupported add(null)");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/CollectionAddTester.java

        assertTrue("add(null) should return true", collection.add(null));
        expectAdded((E) null);
      }
    
      @CollectionFeature.Require(value = SUPPORTS_ADD, absent = ALLOWS_NULL_VALUES)
      public void testAdd_nullUnsupported() {
        assertThrows(NullPointerException.class, () -> collection.add(null));
        expectUnchanged();
        expectNullMissingWhenNullUnsupported("Should not contain null after unsupported add(null)");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

          for (Object element : contents) {
            if (element == null) {
              throw new NullPointerException();
            }
          }
        }
      }
    
      @Override
      public int size() {
        return contents.length;
      }
    
      @Override
      public boolean contains(@Nullable Object object) {
        if (!allowNulls) {
          // behave badly
          if (object == null) {
            throw new NullPointerException();
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/RegularImmutableSet.java

      @Override
      public boolean contains(@CheckForNull Object target) {
        @Nullable Object[] table = this.table;
        if (target == null || table.length == 0) {
          return false;
        }
        for (int i = Hashing.smearedHash(target); ; i++) {
          i &= mask;
          Object candidate = table[i];
          if (candidate == null) {
            return false;
          } else if (candidate.equals(target)) {
            return true;
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/SortedSetTestSuiteBuilder.java

        features.add(CollectionFeature.SUBSET_VIEW);
        if (features.remove(CollectionFeature.ALLOWS_NULL_VALUES)) {
          // the null value might be out of bounds, so we can't always construct a subset with nulls
          features.add(CollectionFeature.ALLOWS_NULL_QUERIES);
          // but add null might still be supported if it happens to be within range of the subset
          suppressing.add(CollectionAddTester.getAddNullUnsupportedMethod());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/SortedSetTestSuiteBuilder.java

        features.add(CollectionFeature.SUBSET_VIEW);
        if (features.remove(CollectionFeature.ALLOWS_NULL_VALUES)) {
          // the null value might be out of bounds, so we can't always construct a subset with nulls
          features.add(CollectionFeature.ALLOWS_NULL_QUERIES);
          // but add null might still be supported if it happens to be within range of the subset
          suppressing.add(CollectionAddTester.getAddNullUnsupportedMethod());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

       * It's unclear whether nulls were to be permitted or forbidden, but presumably the eventual fix
       * will be to permit them, as it seems more likely that code would depend on that behavior than on
       * the other. Thus, we say the bug is in set(), which fails to support null.
       */
      @J2ktIncompatible
      @GwtIncompatible // reflection
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

       * It's unclear whether nulls were to be permitted or forbidden, but presumably the eventual fix
       * will be to permit them, as it seems more likely that code would depend on that behavior than on
       * the other. Thus, we say the bug is in set(), which fails to support null.
       */
      @J2ktIncompatible
      @GwtIncompatible // reflection
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/ListsTest.java

                        }
                        return transform(fromList, removeFirst);
                      }
                    })
                .named("Lists.transform, random access, no nulls")
                .withFeatures(
                    CollectionSize.ANY,
                    ListFeature.REMOVE_OPERATIONS,
                    CollectionFeature.SERIALIZABLE,
                    CollectionFeature.ALLOWS_NULL_QUERIES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ListsTest.java

                        }
                        return transform(fromList, removeFirst);
                      }
                    })
                .named("Lists.transform, random access, no nulls")
                .withFeatures(
                    CollectionSize.ANY,
                    ListFeature.REMOVE_OPERATIONS,
                    CollectionFeature.SERIALIZABLE,
                    CollectionFeature.ALLOWS_NULL_QUERIES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
Back to top