Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 200 for cast1 (0.07 sec)

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

          Iterator<? extends T> iterator) {
        checkNotNull(iterator);
        if (iterator instanceof UnmodifiableIterator) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          UnmodifiableIterator<T> result = (UnmodifiableIterator<T>) iterator;
          return result;
        }
        return new UnmodifiableIterator<T>() {
          @Override
          public boolean hasNext() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. internal/s3select/sql/analysis.go

    		result = qProp{err: errUnexpectedInvalidNode}
    	}
    	return
    }
    
    func (e *FuncExpr) analyze(s *Select) (result qProp) {
    	funcName := e.getFunctionName()
    
    	switch funcName {
    	case sqlFnCast:
    		return e.Cast.Expr.analyze(s)
    
    	case sqlFnExtract:
    		return e.Extract.From.analyze(s)
    
    	case sqlFnDateAdd:
    		result.combine(e.DateAdd.Quantity.analyze(s))
    		result.combine(e.DateAdd.Timestamp.analyze(s))
    		return result
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 23 07:19:11 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableSortedMap.java

          // even though K doesn't explicitly implement Comparable.
          comparator = (Comparator<? super K>) NATURAL_ORDER;
        }
        if (map instanceof ImmutableSortedMap) {
          // TODO(kevinb): Prove that this cast is safe, even though
          // Collections.unmodifiableSortedMap requires the same key type.
          @SuppressWarnings("unchecked")
          ImmutableSortedMap<K, V> kvMap = (ImmutableSortedMap<K, V>) map;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

    import okio.ByteString
    
    /**
     * ASN.1 adapters adapted from the specifications in [RFC 5280][rfc_5280].
     *
     * [rfc_5280]: https://tools.ietf.org/html/rfc5280
     */
    @Suppress("UNCHECKED_CAST") // This needs to cast decoded collections.
    internal object CertificateAdapters {
      /**
       * ```
       * Time ::= CHOICE {
       *   utcTime        UTCTime,
       *   generalTime    GeneralizedTime
       * }
       * ```
       *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/InterruptibleTask.java

          if (!compareAndSet(currentThread, DONE)) {
            waitForInterrupt(currentThread);
          }
          if (run) {
            if (error == null) {
              // The cast is safe because of the `run` and `error` checks.
              afterRanInterruptiblySuccess(uncheckedCastNullableTToT(result));
            } else {
              afterRanInterruptiblyFailure(error);
            }
          }
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetNavigationTester.java

      private Entry<E> c;
    
      /** Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557 */
      static <T> SortedMultiset<T> cast(Multiset<T> iterable) {
        return (SortedMultiset<T>) iterable;
      }
    
      @Override
      public void setUp() throws Exception {
        super.setUp();
        sortedMultiset = cast(getMultiset());
        entries =
            copyToList(
                getSubjectGenerator()
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

        assertThat(UnsignedBytes.saturatedCast(Long.MIN_VALUE)).isEqualTo(LEAST);
      }
    
      private static void assertCastFails(long value) {
        try {
          UnsignedBytes.checkedCast(value);
          fail("Cast to byte should have failed: " + value);
        } catch (IllegalArgumentException ex) {
          assertWithMessage(value + " not found in exception text: " + ex.getMessage())
              .that(ex.getMessage().contains(String.valueOf(value)))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/DerivedCollectionGenerators.java

        }
    
        @Override
        public K[] createArray(int length) {
          // TODO: with appropriate refactoring of OneSizeGenerator, we can perhaps
          // tidy this up and get rid of the casts here and in
          // MapValueCollectionGenerator.
    
          return ((TestMapGenerator<K, V>) mapGenerator.getInnerGenerator()).createKeyArray(length);
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 18.2K bytes
    - Viewed (0)
Back to top