- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 173 for CAST (0.07 sec)
-
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) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
val fullEventSequence = eventSequence.toList() try { while (true) { val event = takeEvent() if (eventClass.isInstance(event)) { return eventClass.cast(event) } } } catch (e: NoSuchElementException) { throw AssertionError("full event sequence: $fullEventSequence", e) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/SignedBytes.java
return result; } /** * Returns the {@code byte} nearest in value to {@code value}. * * @param value any {@code long} value * @return the same value cast to {@code byte} if it is in the range of the {@code byte} type, * {@link Byte#MAX_VALUE} if it is too large, or {@link Byte#MIN_VALUE} if it is too small */ public static byte saturatedCast(long value) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 7.3K bytes - Viewed (0) -
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) -
guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
assertEquals(11, queue.capacity()); checkUnbounded(queue); assertSame(SOME_COMPARATOR, queue.comparator()); } // We use the rawtypeToWildcard "cast" to make the test work with J2KT in other tests. Leaving one // test without that cast to verify that using the raw Comparable works outside J2KT. @J2ktIncompatible // J2KT's translation of raw Comparable is not a supertype of Int translation
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/Striped64.java
Class<Unsafe> k = Unsafe.class; 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: Fri Jun 14 17:55:55 UTC 2024 - 11.5K bytes - Viewed (0) -
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) -
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) -
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) -
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)