Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 35 for covariantly (0.24 seconds)

  1. build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/codegen/ApiExtensionGeneratorFacade.kt

    
    private
    fun Variance.toKotlinString() =
        when (this) {
            Variance.INVARIANT -> ""
            Variance.COVARIANT -> "out "
            Variance.CONTRAVARIANT -> "in "
        }
    
    
    private
    fun List<ApiTypeUsage>.toTypeArgumentsString(type: ApiType? = null): String =
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Wed Mar 12 15:56:18 GMT 2025
    - 17.8K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/ImmutableList.java

       */
      public static <E> ImmutableList<E> copyOf(Collection<? extends E> elements) {
        if (elements instanceof ImmutableCollection) {
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableList<E> list = ((ImmutableCollection<E>) elements).asList();
          return list.isPartialView() ? asImmutableList(list.toArray()) : list;
        }
        return construct(elements.toArray());
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Nov 17 22:50:48 GMT 2025
    - 30.6K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/collect/Multisets.java

          Multiset<? extends E> multiset) {
        if (multiset instanceof UnmodifiableMultiset || multiset instanceof ImmutableMultiset) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          Multiset<E> result = (Multiset<E>) multiset;
          return result;
        }
        return new UnmodifiableMultiset<>(checkNotNull(multiset));
      }
    
      /**
       * Simply returns its argument.
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 18:35:44 GMT 2025
    - 41.3K bytes
    - Click Count (0)
  4. guava/src/com/google/common/collect/Multisets.java

          Multiset<? extends E> multiset) {
        if (multiset instanceof UnmodifiableMultiset || multiset instanceof ImmutableMultiset) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          Multiset<E> result = (Multiset<E>) multiset;
          return result;
        }
        return new UnmodifiableMultiset<>(checkNotNull(multiset));
      }
    
      /**
       * Simply returns its argument.
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 18:35:44 GMT 2025
    - 41.2K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/collect/ImmutableTable.java

            checkNotNull(cell.getRowKey(), "row");
            checkNotNull(cell.getColumnKey(), "column");
            checkNotNull(cell.getValue(), "value");
            @SuppressWarnings("unchecked") // all supported methods are covariant
            Cell<R, C, V> immutableCell = (Cell<R, C, V>) cell;
            cells.add(immutableCell);
          } else {
            put(cell.getRowKey(), cell.getColumnKey(), cell.getValue());
          }
          return this;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 17.4K bytes
    - Click Count (0)
  6. guava/src/com/google/common/collect/ImmutableSet.java

        // Don't refer to ImmutableSortedSet by name so it won't pull in all that code
        if (elements instanceof ImmutableSet && !(elements instanceof SortedSet)) {
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableSet<E> set = (ImmutableSet<E>) elements;
          if (!set.isPartialView()) {
            return set;
          }
        } else if (elements instanceof EnumSet) {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Fri Nov 07 16:09:47 GMT 2025
    - 35.3K bytes
    - Click Count (0)
  7. guava/src/com/google/common/collect/ImmutableTable.java

            checkNotNull(cell.getRowKey(), "row");
            checkNotNull(cell.getColumnKey(), "column");
            checkNotNull(cell.getValue(), "value");
            @SuppressWarnings("unchecked") // all supported methods are covariant
            Cell<R, C, V> immutableCell = (Cell<R, C, V>) cell;
            cells.add(immutableCell);
          } else {
            put(cell.getRowKey(), cell.getColumnKey(), cell.getValue());
          }
          return this;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 17.3K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/base/Optional.java

     * href="https://github.com/google/guava/wiki/UsingAndAvoidingNullExplained#optional">using {@code
     * Optional}</a>.
     *
     * @param <T> the type of instance that can be contained. {@code Optional} is naturally covariant on
     *     this type, so it is safe to cast an {@code Optional<T>} to {@code Optional<S>} for any
     *     supertype {@code S} of {@code T}.
     * @author Kurt Alfred Kluever
     * @author Kevin Bourrillion
     * @since 10.0
     */
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Jun 04 13:03:16 GMT 2025
    - 15.4K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/ImmutableBiMap.java

       */
      public static <K, V> ImmutableBiMap<K, V> copyOf(
          Iterable<? extends Entry<? extends K, ? extends V>> entries) {
        @SuppressWarnings("unchecked") // we'll only be using getKey and getValue, which are covariant
        Entry<K, V>[] entryArray = (Entry<K, V>[]) Iterables.toArray(entries, EMPTY_ENTRY_ARRAY);
        switch (entryArray.length) {
          case 0:
            return of();
          case 1:
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 22.7K bytes
    - Click Count (0)
  10. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

          Comparator<? super E> comparator, Iterable<? extends E> elements) {
        if (elements instanceof ImmutableSortedMultiset) {
          @SuppressWarnings("unchecked") // immutable collections are always safe for covariant casts
          ImmutableSortedMultiset<E> multiset = (ImmutableSortedMultiset<E>) elements;
          if (comparator.equals(multiset.comparator())) {
            if (multiset.isPartialView()) {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 29.5K bytes
    - Click Count (0)
Back to Top