Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for unchecked (0.2 sec)

  1. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

        if (hasSameComparator && (elements instanceof ImmutableSortedSet)) {
          @SuppressWarnings("unchecked")
          ImmutableSortedSet<E> original = (ImmutableSortedSet<E>) elements;
          if (!original.isPartialView()) {
            return original;
          }
        }
        @SuppressWarnings("unchecked") // elements only contains E's; it's safe.
        E[] array = (E[]) Iterables.toArray(elements);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  2. 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));
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

        }
      }
    
      /**
       * Returns the empty sorted map.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      // unsafe, comparator() returns a comparator on the specified type
      // TODO(kevinb): evaluate whether or not of().comparator() should return null
      public static <K, V> ImmutableSortedMap<K, V> of() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableMap.java

          @SuppressWarnings({"rawtypes", "unchecked"})
          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]);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSetMultimap.java

      /**
       * Returns the empty multimap.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      // Casting is safe because the multimap will never hold any elements.
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableSetMultimap<K, V> of() {
        return (ImmutableSetMultimap<K, V>) EmptyImmutableSetMultimap.INSTANCE;
      }
    
      /** Returns an immutable multimap containing a single entry. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

          }
          try {
            @SuppressWarnings("unchecked") // we catch CCE's
            C c = (C) o;
            return ImmutableRangeSet.this.contains(c);
          } catch (ClassCastException e) {
            return false;
          }
        }
    
        @Override
        int indexOf(@CheckForNull Object target) {
          if (contains(target)) {
            @SuppressWarnings("unchecked") // if it's contained, it's definitely a C
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableRangeMap.java

      }
    
      /**
       * Returns an empty immutable range map.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      public static <K extends Comparable<?>, V> ImmutableRangeMap<K, V> of() {
        return (ImmutableRangeMap<K, V>) EMPTY;
      }
    
      /** Returns an immutable range map mapping a single range to a single value. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/MoreCollectors.java

       * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
       *     {@code null}) and returns {@code Optional.empty()} if it has none.
       */
      @SuppressWarnings("unchecked")
      public static <T> Collector<T, ?, Optional<T>> toOptional() {
        return (Collector) TO_OPTIONAL;
      }
    
      private static final Object NULL_PLACEHOLDER = new Object();
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableTable.java

      }
    
      /**
       * Returns an empty immutable table.
       *
       * <p><b>Performance note:</b> the instance returned is a singleton.
       */
      @SuppressWarnings("unchecked")
      public static <R, C, V> ImmutableTable<R, C, V> of() {
        return (ImmutableTable<R, C, V>) SparseImmutableTable.EMPTY;
      }
    
      /** Returns an immutable table containing a single cell. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Iterables.java

       * unchecked cast at some later point:
       *
       * <pre>
       * {@code @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());}
       * </pre>
       */
      @SuppressWarnings("unchecked")
      @GwtIncompatible // Class.isInstance
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
Back to top