- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 180 for requireNonNull (0.11 sec)
-
android/guava/src/com/google/common/collect/ImmutableMap.java
Entry<Object, V>[] entries = new Entry[size]; for (int i = 0; i < size; i++) { // requireNonNull is safe because the first `2*size` elements have been filled in. Object key = requireNonNull(alternatingKeysAndValues[2 * i]); @SuppressWarnings("unchecked") V value = (V) requireNonNull(alternatingKeysAndValues[2 * i + 1]); entries[i] = new AbstractMap.SimpleImmutableEntry<Object, V>(key, value);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 41.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/EqualsTester.java
* objects come from factory methods that are themselves {@code @Nullable}. In reality neither the * array nor its contents can be null, but it is not useful to force the use of {@code * requireNonNull} or the like just to assert that. * * <p>{@code EqualsTester} will always check that every object it is given returns false from
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 31 19:11:50 UTC 2023 - 6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/NullnessCasts.java
* types (or if the type is a non-variable type, like {@code String}), then code should almost * never use this method, preferring instead to call {@code requireNonNull} so as to benefit from * its runtime check. * * <p>An example use case for this method is in implementing an {@code Iterator<T>} whose {@code
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 10 20:36:34 UTC 2022 - 3.9K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java
*/ FilteredProjectDependencyGraph( ProjectDependencyGraph projectDependencyGraph, Collection<? extends MavenProject> whiteList) { this.projectDependencyGraph = Objects.requireNonNull(projectDependencyGraph, "projectDependencyGraph cannot be null"); this.whiteList = new IdentityHashMap<>(); for (MavenProject project : whiteList) { this.whiteList.put(project, null); }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableListMultimap.java
Object key = requireNonNull(stream.readObject()); int valueCount = stream.readInt(); if (valueCount <= 0) { throw new InvalidObjectException("Invalid value count " + valueCount); } ImmutableList.Builder<Object> valuesBuilder = ImmutableList.builder(); for (int j = 0; j < valueCount; j++) { valuesBuilder.add(requireNonNull(stream.readObject())); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 19.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
*/ package com.google.common.testing; import static com.google.common.base.Preconditions.checkArgument; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.CharMatcher;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 20.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/AbstractBiMap.java
import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.NullnessCasts.uncheckedCastNullableTToT; import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Objects;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Aug 24 01:40:03 UTC 2023 - 14.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
} @SuppressWarnings("unchecked") // we must carefully only allow Es to get in E elementData(int index) { /* * requireNonNull is safe as long as we're careful to call this method only with populated * indexes. */ return (E) requireNonNull(queue[index]); } @Override @CheckForNull public E peek() { return isEmpty() ? null : elementData(0); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/TreeRangeMap.java
public V remove(@CheckForNull Object key) { V value = get(key); if (value != null) { // it's definitely in the map, so the cast and requireNonNull are safe @SuppressWarnings("unchecked") Range<K> range = (Range<K>) requireNonNull(key); TreeRangeMap.this.remove(range); return value; } return null; } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 26.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Multimaps.java
stream.defaultReadObject(); factory = (Supplier<? extends Collection<V>>) requireNonNull(stream.readObject()); Map<K, Collection<V>> map = (Map<K, Collection<V>>) requireNonNull(stream.readObject()); setMap(map); } @GwtIncompatible // java serialization not supported @J2ktIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 86.3K bytes - Viewed (0)