- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for covariantly (0.04 sec)
-
android/guava/src/com/google/common/reflect/TypeResolver.java
} /** * Returns a resolver that resolves types "covariantly". * * <p>For example, when resolving {@code List<T>} in the context of {@code ArrayList<?>}, {@code * <T>} is covariantly resolved to {@code <?>} such that return type of {@code List::get} is * {@code <?>}. */ static TypeResolver covariantly(Type contextType) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 22:30:05 UTC 2025 - 25.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableCollection.java
} return newCapacity; } Builder() {} /** * Adds {@code element} to the {@code ImmutableCollection} being built. * * <p>Note that each builder class covariantly returns its own type from this method. * * @param element the element to add * @return this {@code Builder} instance * @throws NullPointerException if {@code element} is null */Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 21.4K bytes - Viewed (0) -
guava/src/com/google/common/reflect/TypeResolver.java
} /** * Returns a resolver that resolves types "covariantly". * * <p>For example, when resolving {@code List<T>} in the context of {@code ArrayList<?>}, {@code * <T>} is covariantly resolved to {@code <?>} such that return type of {@code List::get} is * {@code <?>}. */ static TypeResolver covariantly(Type contextType) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 22:30:05 UTC 2025 - 25.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterators.java
Iterator<? extends T> iterator) { if (iterator instanceof PeekingImpl) { // Safe to cast <? extends T> to <T> because PeekingImpl only uses T // covariantly (and cannot be subclassed to add non-covariant uses). @SuppressWarnings("unchecked") PeekingImpl<T> peeking = (PeekingImpl<T>) iterator; return peeking; } return new PeekingImpl<>(iterator); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 16 12:42:11 UTC 2025 - 51.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableAsList.java
@Override ImmutableCollection<E> delegateCollection() { return delegate; } ImmutableList<? extends E> delegateList() { return delegateList; } @SuppressWarnings("unchecked") // safe covariant cast! @Override public UnmodifiableListIterator<E> listIterator(int index) { return (UnmodifiableListIterator<E>) delegateList.listIterator(index); } @GwtIncompatible // not present in emulated superclass
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 2.8K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Absent.java
} @Override public T or(T defaultValue) { return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); } @SuppressWarnings("unchecked") // safe covariant cast @Override public Optional<T> or(Optional<? extends T> secondChoice) { return (Optional<T>) checkNotNull(secondChoice); } @Override public T or(Supplier<? extends T> supplier) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Apr 15 22:14:00 UTC 2025 - 2.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/RegularImmutableAsList.java
@Override ImmutableCollection<E> delegateCollection() { return delegate; } ImmutableList<? extends E> delegateList() { return delegateList; } @SuppressWarnings("unchecked") // safe covariant cast! @Override public UnmodifiableListIterator<E> listIterator(int index) { return (UnmodifiableListIterator<E>) delegateList.listIterator(index); } @GwtIncompatible // not present in emulated superclass
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 2.8K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java
* TODO: When given an ImmutableList that's a sublist, copy the referenced * portion of the array into a new array to save space? */ @SuppressWarnings("unchecked") // all supported methods are covariant ImmutableCollection<E> list = (ImmutableCollection<E>) elements; return list.asList(); } return copyFromCollection(elements); } @JsMethod
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 11.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMultiset.java
} /** * Returns the empty immutable multiset. * * <p><b>Performance note:</b> the instance returned is a singleton. */ @SuppressWarnings("unchecked") // all supported methods are covariant public static <E> ImmutableMultiset<E> of() { return (ImmutableMultiset<E>) RegularImmutableMultiset.EMPTY; } /** * Returns an immutable multiset containing a single element. *Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 21:07:18 UTC 2025 - 20.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/OptionalTest.java
FluentIterable<? extends Number> numbers = getSomeNumbers(); // Sadly, the following is what users will have to do in some circumstances. @SuppressWarnings("unchecked") // safe covariant cast Optional<Number> first = (Optional<Number>) numbers.first(); Number value = first.or(0.5); // fine } @J2ktIncompatible @GwtIncompatible // NullPointerTester
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 16:03:47 UTC 2025 - 10.5K bytes - Viewed (0)