- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 4,322 for nulls (0.02 seconds)
-
guava-testlib/src/com/google/common/collect/testing/TestContainerGenerator.java
* array of the erased type. */ T create(Object... elements); /** * Helper method to create an array of the appropriate type used by this generator. The returned * array will contain only nulls. */ E[] createArray(int length); /** * Returns the iteration ordering of elements, given the order in which they were added to the
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 2.4K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
} /* * All the ContiguousSet generators below manually reject nulls here. In principle, we'd like to * defer that to Range, since it's ContiguousSet.create() that's used to create the sets. However, * that gets messy here, and we already have null tests for Range. */ /* * These generators also rely on consecutive integer inputs (not necessarily in order, but no
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 15.9K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/TypeVisitor.java
/** * Visits the given types. Null types are ignored. This allows subclasses to call {@code * visit(parameterizedType.getOwnerType())} safely without having to check nulls. */ public final void visit(@Nullable Type... types) { for (Type type : types) { if (type == null || !visited.add(type)) { // null owner type, or already visited; continue; }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 17:27:14 GMT 2025 - 3.6K bytes - Click Count (0) -
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(); } }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 3.8K bytes - Click Count (0) -
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)"); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 6K bytes - Click Count (0) -
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)"); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 6K bytes - Click Count (0) -
guava/src/com/google/common/collect/RegularImmutableSet.java
@Override public boolean contains(@Nullable 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; } } }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 21:07:18 GMT 2025 - 3.8K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java
* href="https://bugs.openjdk.org/browse/JDK-6409434">JDK-6409434</a> is fixed. 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
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 5.2K bytes - Click Count (0) -
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)Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 35.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableList.java
return asImmutableList(array); } /** Views the array as an immutable list. Checks for nulls; does not copy. */ private static <E> ImmutableList<E> construct(Object... elements) { return asImmutableList(checkElementsNotNull(elements)); } /** * Views the array as an immutable list. Does not check for nulls; does not copy. * * <p>The array must be internally created. */
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 27.5K bytes - Click Count (0)