- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for NewArray (0.22 seconds)
-
android/guava/src/com/google/common/collect/ObjectArrays.java
* @param length the length of the new array */ public static <T extends @Nullable Object> T[] newArray(T[] reference, int length) { return Platform.newArray(reference, length); } /** * Returns a new array that contains the concatenated contents of two arrays. * * @param first the first array of elements to concatenate * @param second the second array of elements to concatenate
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 09 15:48:28 GMT 2025 - 8.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/ObjectArrays.java
* @param length the length of the new array */ public static <T extends @Nullable Object> T[] newArray(T[] reference, int length) { return Platform.newArray(reference, length); } /** * Returns a new array that contains the concatenated contents of two arrays. * * @param first the first array of elements to concatenate * @param second the second array of elements to concatenate
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 09 15:48:28 GMT 2025 - 8.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/CharsTest.java
char[] array = {(char) 0, (char) 1, (char) 2}; List<Character> list = Chars.asList(array); char[] newArray = Chars.toArray(list); // Make sure it returned a copy list.set(0, (char) 4); assertThat(newArray).isEqualTo(new char[] {(char) 0, (char) 1, (char) 2}); newArray[1] = (char) 5; assertThat((char) list.get(1)).isEqualTo((char) 1); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 25.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/DoublesTest.java
double[] array = {0.0, 1.0, 2.0}; List<Double> list = Doubles.asList(array); double[] newArray = Doubles.toArray(list); // Make sure it returned a copy list.set(0, 4.0); assertThat(newArray).isEqualTo(new double[] {0.0, 1.0, 2.0}); newArray[1] = 5.0; assertThat((double) list.get(1)).isEqualTo(1.0); } // This test stems from a real bug found by andrewk
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 30.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/primitives/ShortsTest.java
short[] array = {(short) 0, (short) 1, (short) 2}; List<Short> list = Shorts.asList(array); short[] newArray = Shorts.toArray(list); // Make sure it returned a copy list.set(0, (short) 4); assertThat(newArray).isEqualTo(new short[] {(short) 0, (short) 1, (short) 2}); newArray[1] = (short) 5; assertThat((short) list.get(1)).isEqualTo((short) 1); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 27.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/primitives/IntsTest.java
int[] array = {(int) 0, (int) 1, (int) 2}; List<Integer> list = Ints.asList(array); int[] newArray = Ints.toArray(list); // Make sure it returned a copy list.set(0, (int) 4); assertThat(newArray).isEqualTo(new int[] {(int) 0, (int) 1, (int) 2}); newArray[1] = (int) 5; assertThat((int) list.get(1)).isEqualTo((int) 1); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 29.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/IterablesTest.java
public void testToArray() { String[] sourceArray = new String[] {"a", "b", "c"}; Iterable<String> iterable = asList(sourceArray); String[] newArray = Iterables.toArray(iterable, String.class); assertThat(newArray).isEqualTo(sourceArray); } public void testAny() { List<String> list = new ArrayList<>(); Predicate<String> predicate = equalTo("pants");
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 18:44:53 GMT 2025 - 45.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/IteratorsTest.java
public void testToArray() { String[] sourceArray = new String[] {"a", "b", "c"}; Iterator<String> iterator = asList(sourceArray).iterator(); String[] newArray = Iterators.toArray(iterator, String.class); assertThat(newArray).isEqualTo(sourceArray); } public void testFilterSimple() { Iterator<String> unfiltered = Lists.newArrayList("foo", "bar").iterator();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 18:44:53 GMT 2025 - 56.7K bytes - Click Count (0) -
guava/src/com/google/common/collect/FluentIterable.java
* * @param type the type of the elements * @return a newly-allocated array into which all the elements of this fluent iterable have been * copied */ @GwtIncompatible // Array.newArray(Class, int) public final E[] toArray(Class<@NonNull E> type) { return Iterables.<E>toArray(getDelegate(), type); } /**
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 22 18:35:44 GMT 2025 - 34.7K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Iterables.java
*/ @GwtIncompatible // Array.newInstance(Class, int) public static <T extends @Nullable Object> T[] toArray( Iterable<? extends T> iterable, Class<@NonNull T> type) { return toArray(iterable, ObjectArrays.newArray(type, 0)); } static <T extends @Nullable Object> T[] toArray(Iterable<? extends T> iterable, T[] array) { Collection<? extends T> collection = castOrCopyToCollection(iterable);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 16 18:35:28 GMT 2025 - 43.8K bytes - Click Count (0)