Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 177 for dcast (0.08 sec)

  1. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

            /*
             * We have an Iterator<E> and want to cast it to MultiExceptionListIterator. Because we're
             * inside an AbstractIteratorTester<E>, that's implicitly a cast to
             * AbstractIteratorTester<E>.MultiExceptionListIterator. The runtime won't be able to verify
             * the AbstractIteratorTester<E> part, so it's an unchecked cast. We know, however, that the
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. compat/maven-compat/src/test/java/org/apache/maven/SimpleLookup.java

            this.objects = objects;
        }
    
        @Override
        public <T> T lookup(Class<T> type) {
            return objects.stream()
                    .filter(type::isInstance)
                    .map(type::cast)
                    .findAny()
                    .orElseThrow(() -> new LookupException("No service of type " + type));
        }
    
        @Override
        public <T> T lookup(Class<T> type, String name) {
            return null;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/NullnessCasts.java

       */
      @SuppressWarnings("nullness")
      @ParametricNullness
      static <T extends @Nullable Object> T uncheckedCastNullableTToT(@CheckForNull T t) {
        return t;
      }
    
      /**
       * Returns {@code null} cast to any type.
       *
       * <p>This method is intended to help with usages of type parameters that have {@linkplain
       * ParametricNullness parametric nullness}. Sometimes, code may receive a null {@code T} but store
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 10 20:36:34 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  4. guava-gwt/test-super/com/google/common/collect/testing/super/com/google/common/collect/testing/Platform.java

     *
     * <p><strong>This .java file should never be consumed by javac.</strong>
     *
     * @author Hayward Chan
     */
    final class Platform {
      // Class.cast is not supported in GWT.
      static void checkCast(Class<?> clazz, Object obj) {}
    
      static <T> T[] clone(T[] array) {
        return (T[]) Arrays.copyOfRange(array, 0, array.length);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.1K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

            if (field.getGenericType() == field.getType() && type.isAssignableFrom(field.getType())) {
              field.setAccessible(true);
              try {
                T constant = type.cast(field.get(null));
                if (constant != null) {
                  return constant;
                }
              } catch (IllegalAccessException impossible) {
                throw new AssertionError(impossible);
              }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  6. 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)
  7. android/guava/src/com/google/common/collect/RegularImmutableList.java

      int internalArrayEnd() {
        return size;
      }
    
      @Override
      int copyIntoArray(@Nullable Object[] dst, int dstOff) {
        arraycopy(array, 0, dst, dstOff, size);
        return dstOff + size;
      }
    
      // The fake cast to E is safe because the creation methods only allow E's
      @Override
      @SuppressWarnings("unchecked")
      public E get(int index) {
        checkElementIndex(index, size);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/RegularImmutableAsList.java

      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)
  9. android/guava/src/com/google/common/collect/GeneralRange.java

          return false;
        }
        // The cast is safe because of the hasLowerBound() check.
        T lbound = uncheckedCastNullableTToT(getLowerEndpoint());
        int cmp = comparator.compare(t, lbound);
        return cmp < 0 | (cmp == 0 & getLowerBoundType() == OPEN);
      }
    
      boolean tooHigh(@ParametricNullness T t) {
        if (!hasUpperBound()) {
          return false;
        }
        // The cast is safe because of the hasUpperBound() check.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/RegularImmutableBiMap.java

        @Nullable ImmutableMapEntry<K, V>[] valueTable = createEntryArray(tableSize);
        /*
         * The cast is safe: n==entryArray.length means that we have filled the whole array with Entry
         * instances, in which case it is safe to cast it from an array of nullable entries to an array
         * of non-null entries.
         */
        @SuppressWarnings("nullness")
        Entry<K, V>[] entries =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.3K bytes
    - Viewed (0)
Back to top