Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 80 for covariant (0.12 sec)

  1. guava/src/com/google/common/cache/RemovalListener.java

       * already been re-added.
       */
      // Technically should accept RemovalNotification<? extends K, ? extends V>, but because
      // RemovalNotification is guaranteed covariant, let's make users' lives simpler.
      void onRemoval(RemovalNotification<K, V> notification);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 18:00:07 UTC 2021
    - 2K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon May 17 14:07:47 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/RemovalListener.java

       * already been re-added.
       */
      // Technically should accept RemovalNotification<? extends K, ? extends V>, but because
      // RemovalNotification is guaranteed covariant, let's make users' lives simpler.
      void onRemoval(RemovalNotification<K, V> notification);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 15 18:00:07 UTC 2021
    - 2K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 3K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 14 22:14:46 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

        if (map instanceof ImmutableClassToInstanceMap) {
          @SuppressWarnings("rawtypes") // JDT-based J2KT Java frontend does not permit the direct cast
          Map rawMap = map;
          @SuppressWarnings("unchecked") // covariant casts safe (unmodifiable)
          ImmutableClassToInstanceMap<B> cast = (ImmutableClassToInstanceMap<B>) rawMap;
          return cast;
        }
        return new Builder<B>().putAll(map).build();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 10 21:56:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

        if (map instanceof ImmutableClassToInstanceMap) {
          @SuppressWarnings("rawtypes") // JDT-based J2KT Java frontend does not permit the direct cast
          Map rawMap = map;
          @SuppressWarnings("unchecked") // covariant casts safe (unmodifiable)
          ImmutableClassToInstanceMap<B> cast = (ImmutableClassToInstanceMap<B>) rawMap;
          return cast;
        }
        return new Builder<B>().putAll(map).build();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 10 21:56:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  9. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Tables.java

        UnmodifiableTable(Table<? extends R, ? extends C, ? extends V> delegate) {
          this.delegate = checkNotNull(delegate);
        }
    
        @SuppressWarnings("unchecked") // safe, covariant cast
        @Override
        protected Table<R, C, V> delegate() {
          return (Table<R, C, V>) delegate;
        }
    
        @Override
        public Set<Cell<R, C, V>> cellSet() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 26.3K bytes
    - Viewed (0)
Back to top