- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for Cast (0.03 sec)
-
android/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 - 20.6K bytes - Viewed (0) -
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) -
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) -
android/guava/src/com/google/common/base/Optional.java
* Optional}</a>. * * @param <T> the type of instance that can be contained. {@code Optional} is naturally covariant on * this type, so it is safe to cast an {@code Optional<T>} to {@code Optional<S>} for any * supertype {@code S} of {@code T}. * @author Kurt Alfred Kluever * @author Kevin Bourrillion * @since 10.0 */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 15.4K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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)