Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for covariantly (0.04 sec)

  1. 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.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 41.3K bytes
    - Viewed (0)
  2. 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;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 17.4K bytes
    - Viewed (0)
  3. 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) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Nov 07 16:09:47 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  4. 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;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  5. 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());
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 30.6K bytes
    - Viewed (0)
  6. 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
     */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Jun 04 13:03:16 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  7. 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()) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 21:07:18 UTC 2025
    - 29.5K bytes
    - Viewed (0)
  8. 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:
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 22.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Iterables.java

          Iterable<? extends T> iterable) {
        checkNotNull(iterable);
        if (iterable instanceof UnmodifiableIterable || iterable instanceof ImmutableCollection) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          Iterable<T> result = (Iterable<T>) iterable;
          return result;
        }
        return new UnmodifiableIterable<>(iterable);
      }
    
      /**
       * Simply returns its argument.
       *
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 16 18:35:28 UTC 2025
    - 43.8K bytes
    - Viewed (0)
  10. android/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()) {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 35.2K bytes
    - Viewed (0)
Back to top