Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,650 for cast (0.03 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

          /*
           * The cast is safe: There was no exception, so the assignment from getDone must have
           * succeeded.
           */
          set(uncheckedCastNullableTToT(sourceResult));
          return;
        }
    
        if (!isInstanceOfThrowableClass(throwable, localExceptionType)) {
          setFuture(localInputFuture);
          // TODO(cpovirk): Test that fallback is not run in this case.
          return;
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/RegularContiguousSet.java

      }
    
      @Override
      public UnmodifiableIterator<C> iterator() {
        return new AbstractSequentialIterator<C>(first()) {
          final C last = last();
    
          @Override
          @CheckForNull
          protected C computeNext(C previous) {
            return equalsOrThrow(previous, last) ? null : domain.next(previous);
          }
        };
      }
    
      @GwtIncompatible // NavigableSet
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/primitives/UnsignedIntsTest.java

        assertCastFails(Long.MAX_VALUE);
        assertCastFails(Long.MIN_VALUE);
      }
    
      private static void assertCastFails(long value) {
        try {
          UnsignedInts.checkedCast(value);
          fail("Cast to int should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertThat(ex).hasMessageThat().contains(String.valueOf(value));
        }
      }
    
      public void testSaturatedCast() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/util/MD4.java

            for (int i = 0; i < 8; i++)
                tail[padLen + i] = (byte)((count * 8) >>> (8 * i));
    
            engineUpdate(tail, 0, tail.length);
    
            byte[] result = new byte[16];
            // cast this MD4's context (array of 4 ints) into an array of 16 bytes.
            for (int i = 0; i < 4; i++)
                for (int j = 0; j < 4; j++)
                    result[i * 4 + j] = (byte)(context[i] >>> (8 * j));
    
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 9.3K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

          field.isAccessible = true
          val value = field.get(instance)
          return if (!fieldType.isInstance(value)) null else fieldType.cast(value)
        } catch (_: NoSuchFieldException) {
        }
    
        c = c.superclass
      }
    
      // Didn't find the field we wanted. As a last gasp attempt,
      // try to find the value on a delegate.
      if (fieldName != "delegate") {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java

        }
      }
    
      public static class DegeneratedImmutableSetGenerator extends TestStringSetGenerator {
        // Make sure we get what we think we're getting, or else this test
        // is pointless
        @SuppressWarnings("cast")
        @Override
        protected Set<String> create(String[] elements) {
          return (ImmutableSet<String>) ImmutableSet.of(elements[0], elements[0]);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Iterators.java

        return iterator.hasNext() ? iterator.next() : defaultValue;
      }
    
      /**
       * Advances {@code iterator} to the end, returning the last element.
       *
       * @return the last element of {@code iterator}
       * @throws NoSuchElementException if the iterator is empty
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T getLast(Iterator<T> iterator) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/hash/LittleEndianByteArray.java

                      for (Field f : k.getDeclaredFields()) {
                        f.setAccessible(true);
                        Object x = f.get(null);
                        if (k.isInstance(x)) {
                          return k.cast(x);
                        }
                      }
                      throw new NoSuchFieldError("the Unsafe");
                    });
          } catch (PrivilegedActionException e) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.8K bytes
    - Viewed (0)
Back to top