- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 34 for newEArray (0.05 seconds)
-
android/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 Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 01:43:32 GMT 2026 - 29.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/primitives/FloatsTest.java
float[] array = {0.0f, 1.0f, 2.0f}; List<Float> list = Floats.asList(array); float[] newArray = Floats.toArray(list); // Make sure it returned a copy list.set(0, 4.0f); assertThat(newArray).isEqualTo(new float[] {0.0f, 1.0f, 2.0f}); newArray[1] = 5.0f; assertThat((float) list.get(1)).isEqualTo(1.0f); } // This test stems from a real bug found by andrewk
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Mar 08 01:43:32 GMT 2026 - 29.4K bytes - Click Count (0) -
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 Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 47.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/OrderingTest.java
package com.google.common.collect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterators.singletonIterator; import static com.google.common.collect.ObjectArrays.newArray; import static com.google.common.collect.ReflectionFreeAssertThrows.assertThrows; import static com.google.common.collect.testing.Helpers.testComparator; import static com.google.common.testing.SerializableTester.reserialize;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 43.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/OrderingTest.java
package com.google.common.collect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Iterators.singletonIterator; import static com.google.common.collect.ObjectArrays.newArray; import static com.google.common.collect.ReflectionFreeAssertThrows.assertThrows; import static com.google.common.collect.testing.Helpers.testComparator; import static com.google.common.testing.SerializableTester.reserialize;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 43.2K bytes - Click Count (0) -
guava/src/com/google/common/collect/ImmutableCollection.java
Object[] internal = internalArray(); if (internal != null) { return Platform.copy(internal, internalArrayStart(), internalArrayEnd(), other); } other = ObjectArrays.newArray(other, size); } else if (other.length > size) { other[size] = null; } copyIntoArray(other, 0); return other; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 18.7K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/ImmutableCollection.java
Object[] internal = internalArray(); if (internal != null) { return Platform.copy(internal, internalArrayStart(), internalArrayEnd(), other); } other = ObjectArrays.newArray(other, size); } else if (other.length > size) { other[size] = null; } copyIntoArray(other, 0); return other; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 21.4K 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 Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 57.3K bytes - Click Count (0) -
android/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 Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 57.3K bytes - Click Count (0) -
android/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 Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Apr 02 14:49:41 GMT 2026 - 34.7K bytes - Click Count (0)