Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 200 for cast1 (0.04 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. android/guava/src/com/google/common/collect/NullnessCasts.java

    package com.google.common.collect;
    
    import com.google.common.annotations.GwtCompatible;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /** A utility method to perform unchecked casts to suppress errors produced by nullness analyses. */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    final class NullnessCasts {
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 10 20:36:34 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/NullnessCasts.java

    package com.google.common.collect;
    
    import com.google.common.annotations.GwtCompatible;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /** A utility method to perform unchecked casts to suppress errors produced by nullness analyses. */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    final class NullnessCasts {
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 10 20:36:34 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  10. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/ProtoLookup.java

        @Override
        public <T> T lookup(Class<T> type, String name) {
            return lookup(type);
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type) {
            return Optional.ofNullable(type.cast(components.get(type)));
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type, String name) {
            return lookupOptional(type);
        }
    
        @Override
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.8K bytes
    - Viewed (0)
Back to top