- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 172 for element1 (0.1 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/google/ListGenerators.java
@Override protected List<String> create(String[] elements) { String[] suffix = {"f", "g"}; String[] all = new String[elements.length + suffix.length]; arraycopy(elements, 0, all, 0, elements.length); arraycopy(suffix, 0, all, elements.length, suffix.length); return ImmutableList.copyOf(all).subList(0, elements.length); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java
} protected void expectMissingKeys(K... elements) { for (K element : elements) { assertFalse("Should not contain key " + element, getMap().containsKey(element)); } } protected void expectMissingValues(V... elements) { for (V element : elements) { assertFalse("Should not contain value " + element, getMap().containsValue(element)); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 7.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java
public void testHashCode_containingNull() { Collection<E> elements = getSampleElements(getNumElements() - 1); int expectedHashCode = 0; for (E element : elements) { expectedHashCode += ((element == null) ? 0 : element.hashCode()); } elements.add(null); collection = getSubjectGenerator().create(elements.toArray()); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/MultisetsCollectionTest.java
Multiset<String> multiset1 = LinkedHashMultiset.create(); Multiset<String> multiset2 = LinkedHashMultiset.create(); multiset1.add("only1"); multiset2.add("only2"); for (int i = 0; i < elements.length; i++) { multiset1.add(elements[i]); multiset2.add(elements[elements.length - 1 - i]); } if (elements.length > 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 9.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/MinMaxPriorityQueue.java
} /** * Adds the given element to this queue. If this queue has a maximum size, after adding {@code * element} the queue will automatically evict its greatest element (according to its comparator), * which may be {@code element} itself. * * @return {@code true} always */ @CanIgnoreReturnValue @Override public boolean add(E element) { offer(element); return true; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 34.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java
@Override protected Set<String> create(String[] elements) { return ImmutableSet.copyOf(elements); } } public static class ImmutableSetUnsizedBuilderGenerator extends TestStringSetGenerator { @Override protected Set<String> create(String[] elements) { ImmutableSet.Builder<String> builder = ImmutableSet.builder(); for (String e : elements) { builder.add(e); }
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-tests/test/com/google/common/collect/PeekingIteratorTest.java
assertEquals("Should have removed an element", 2, list.size()); assertFalse("Second element should be gone", list.contains("B")); } static class ThrowsAtEndException extends RuntimeException { /* nothing */ } /** * This Iterator claims to have more elements than the underlying iterable, but when you try to * fetch the extra elements, it throws an unchecked exception. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
// Query Operations /** * Returns the number of occurrences of {@code element} in this multiset. * * @param element the element to look for * @return the nonnegative number of occurrences of the element */ @Override public int count(@CheckForNull Object element) { AtomicInteger existingCounter = safeGet(countMap, element); return (existingCounter == null) ? 0 : existingCounter.get(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 21.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/ObjectArrays.java
/** * Returns a new array that prepends {@code element} to {@code array}. * * @param element the element to prepend to the front of {@code array} * @param array the array of elements to append * @return an array whose size is one larger than {@code array}, with {@code element} occupying * the first position, and the elements of {@code array} occupying the remaining elements. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java
for (int i = 0; i < 100; i++) { Element element = Element.values()[random.nextInt(range)]; elements.add(element); queue.add(element); } Iterator<Element> queueIterator = queue.iterator(); int remaining = queue.size(); while (queueIterator.hasNext()) { Element element = queueIterator.next(); remaining--;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 35.9K bytes - Viewed (0)